-
Notifications
You must be signed in to change notification settings - Fork 69
[native_assets_cli] Fix syntax required fields #2116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
PR HealthBreaking changes ✔️
Changelog Entry ✔️
Changes to files need to be accounted for in their respective changelogs. API leaks ✔️The following packages contain symbols visible in the public API, but not exported by the library. Export these symbols or remove them from your publicly visible API.
License Headers ✔️
All source files should start with a license header. Unrelated files missing license headers
|
30849cb
to
d725cbb
Compare
@@ -87,7 +87,7 @@ final class CodeAsset { | |||
required LinkMode linkMode, | |||
required OS os, | |||
Uri? file, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a style question, and not something for the current PR, but I personally like setting nullable parameter as required
to make people think about if they want to leave out the argument.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do like that idea in this context. It means that the semantic layer around it explicitly has to pass null. And most likely if we're adding a new optional field, we should not be forgetting to pass it from the semantic API to the syntax.
Edit: err, this is the semantic API used by users. It would make file: null
for all code assets with the link mode not requiring a file. I think that might be overly verbose.
d725cbb
to
a56ca2a
Compare
Closes #2039
Makes fields required in the syntax instead of semantic errors. The code for the semantic errors is simply deleted now.