Skip to content

[cli] fallback to _start value for --exportStart if argument was skipped #2343

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

Merged

Conversation

MaxGraey
Copy link
Member

  • I've read the contributing guidelines
  • I've added my name and email to the NOTICE file

@MaxGraey MaxGraey requested a review from dcodeIO June 27, 2022 09:00
@dcodeIO
Copy link
Member

dcodeIO commented Jun 27, 2022

Isn't unquoting something the shell / Node already does according to conventions? Seems to me that postprocessing again can lead to strange issues, in particular if we ever add an option that may depend on inner quotes in strings. Do you have an example of what doesn't work currently and would be fixed?

@MaxGraey
Copy link
Member Author

util/options.js doesn't do this. Does it better add unquotting to options.js?

@dcodeIO
Copy link
Member

dcodeIO commented Jun 27, 2022

I think it also doesn't need to, because if one specifies "abc" on the command line, the shell / Node.js already remove the quotes according to their conventions, so the CLI only sees abc anyway.

node -e "console.log(process.argv)" "hello"
[ 'path/to/node', 'hello' ]

@MaxGraey
Copy link
Member Author

MaxGraey commented Jun 27, 2022

But how about web browser mode and asconfig?

@dcodeIO
Copy link
Member

dcodeIO commented Jun 27, 2022

I think there one wouldn't specify "\"hello\"", but just put "hello" so that processing the JS/JSON does its natural thing.

@MaxGraey MaxGraey changed the title Allow quoted args for runtime, target and exportStart. Print error if exportStart has missed argument Print an error if --exportStart has missed argument Jun 27, 2022
@MaxGraey MaxGraey changed the title Print an error if --exportStart has missed argument [cli] fallback to _start value for --exportStart if argument was skipped Jun 27, 2022
@MaxGraey MaxGraey merged commit 2ccea6b into AssemblyScript:main Jun 27, 2022
@MaxGraey MaxGraey deleted the improve-exportStart-diagnistics branch June 27, 2022 12:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants