-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
refactor: reorganize global flags #3389
Conversation
1502846
to
3b7d93d
Compare
- Remove ability to specify run arguments like `--allow-net` after the script argument. It's too hacky to make work with clap. - Remove `--v8-options`, instead use `--v8-flags=--help` - Give more descriptive names to unit tests in flags.rs - Assume argv and subcommand into DenoFlags struct so the output of flags module is only DenoFlags rather than the tuple (subcommand, flags, argv). - Improve CLI help text - Make `deno run` specific args like `--allow-net` only show up in 'deno help run' instead of as global flags in `deno help`. - Removes `deno version` to simplify our implementation and be closer to clap defaults. `deno -V` now only shows Deno's version and not V8's nor TypeScript. `Deno.versions` can be used to see that information. - Prevent clap from auto-detecting terminal width and attempting to wrap text.
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.
--config
, --no-fetch
, --lock
and --lock-write
should apply to deno fetch
as well. --lock-write
shouldn't apply to deno test
.
@nayeemrmn Why would |
Doesn't it affect compilation?
#3383 (comment). I agree that the naming is inconsistent. That was actually what prompted #3384. |
Yes, ok. I agree and I've made the change. Regarding |
It's hard to reason about since I'm not sure what the use case of Say I want to disable remote module downloading but I still want to use |
@nayeemrmn Ah ok. I understand now. But maybe we should call it something else like |
If we were to rename I know @ry you wanted |
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 am down with the changes to how flags are interpreted and I see no issues with the code.
That said it's a very long patch. Are there areas in particular that you think need some extra eyeballs?
Also, has this been addressed? #3389 (comment)
Tentatively approved.
Nope - I think this is good to go
Now it has. |
- Remove ability to specify run arguments like `--allow-net` after the script argument. It's too hacky to make work with clap. - Remove `--v8-options`, instead use `--v8-flags=--help` - Give more descriptive names to unit tests in flags.rs - Assume argv and subcommand into DenoFlags struct so the output of flags module is only DenoFlags rather than the tuple (subcommand, flags, argv). - Improve CLI help text - Make `deno run` specific args like `--allow-net` only show up in 'deno help run' instead of as global flags in `deno help`. - Removes `deno version` to simplify our implementation and be closer to clap defaults. `deno -V` now only shows Deno's version and not V8's nor TypeScript. `Deno.versions` can be used to see that information. - Prevent clap from auto-detecting terminal width and attempting to wrap text.
- Remove ability to specify run arguments like `--allow-net` after the script argument. It's too hacky to make work with clap. - Remove `--v8-options`, instead use `--v8-flags=--help` - Give more descriptive names to unit tests in flags.rs - Assume argv and subcommand into DenoFlags struct so the output of flags module is only DenoFlags rather than the tuple (subcommand, flags, argv). - Improve CLI help text - Make `deno run` specific args like `--allow-net` only show up in 'deno help run' instead of as global flags in `deno help`. - Removes `deno version` to simplify our implementation and be closer to clap defaults. `deno -V` now only shows Deno's version and not V8's nor TypeScript. `Deno.versions` can be used to see that information. - Prevent clap from auto-detecting terminal width and attempting to wrap text.
- Remove ability to specify run arguments like `--allow-net` after the script argument. It's too hacky to make work with clap. - Remove `--v8-options`, instead use `--v8-flags=--help` - Give more descriptive names to unit tests in flags.rs - Assume argv and subcommand into DenoFlags struct so the output of flags module is only DenoFlags rather than the tuple (subcommand, flags, argv). - Improve CLI help text - Make `deno run` specific args like `--allow-net` only show up in 'deno help run' instead of as global flags in `deno help`. - Removes `deno version` to simplify our implementation and be closer to clap defaults. `deno -V` now only shows Deno's version and not V8's nor TypeScript. `Deno.versions` can be used to see that information. - Prevent clap from auto-detecting terminal width and attempting to wrap text.
- Remove ability to specify run arguments like `--allow-net` after the script argument. It's too hacky to make work with clap. - Remove `--v8-options`, instead use `--v8-flags=--help` - Give more descriptive names to unit tests in flags.rs - Assume argv and subcommand into DenoFlags struct so the output of flags module is only DenoFlags rather than the tuple (subcommand, flags, argv). - Improve CLI help text - Make `deno run` specific args like `--allow-net` only show up in 'deno help run' instead of as global flags in `deno help`. - Removes `deno version` to simplify our implementation and be closer to clap defaults. `deno -V` now only shows Deno's version and not V8's nor TypeScript. `Deno.versions` can be used to see that information. - Prevent clap from auto-detecting terminal width and attempting to wrap text.
- Remove ability to specify run arguments like `--allow-net` after the script argument. It's too hacky to make work with clap. - Remove `--v8-options`, instead use `--v8-flags=--help` - Give more descriptive names to unit tests in flags.rs - Assume argv and subcommand into DenoFlags struct so the output of flags module is only DenoFlags rather than the tuple (subcommand, flags, argv). - Improve CLI help text - Make `deno run` specific args like `--allow-net` only show up in 'deno help run' instead of as global flags in `deno help`. - Removes `deno version` to simplify our implementation and be closer to clap defaults. `deno -V` now only shows Deno's version and not V8's nor TypeScript. `Deno.versions` can be used to see that information. - Prevent clap from auto-detecting terminal width and attempting to wrap text.
- Remove ability to specify run arguments like `--allow-net` after the script argument. It's too hacky to make work with clap. - Remove `--v8-options`, instead use `--v8-flags=--help` - Give more descriptive names to unit tests in flags.rs - Assume argv and subcommand into DenoFlags struct so the output of flags module is only DenoFlags rather than the tuple (subcommand, flags, argv). - Improve CLI help text - Make `deno run` specific args like `--allow-net` only show up in 'deno help run' instead of as global flags in `deno help`. - Removes `deno version` to simplify our implementation and be closer to clap defaults. `deno -V` now only shows Deno's version and not V8's nor TypeScript. `Deno.versions` can be used to see that information. - Prevent clap from auto-detecting terminal width and attempting to wrap text.
- Remove ability to specify run arguments like `--allow-net` after the script argument. It's too hacky to make work with clap. - Remove `--v8-options`, instead use `--v8-flags=--help` - Give more descriptive names to unit tests in flags.rs - Assume argv and subcommand into DenoFlags struct so the output of flags module is only DenoFlags rather than the tuple (subcommand, flags, argv). - Improve CLI help text - Make `deno run` specific args like `--allow-net` only show up in 'deno help run' instead of as global flags in `deno help`. - Removes `deno version` to simplify our implementation and be closer to clap defaults. `deno -V` now only shows Deno's version and not V8's nor TypeScript. `Deno.versions` can be used to see that information. - Prevent clap from auto-detecting terminal width and attempting to wrap text.
- Remove ability to specify run arguments like `--allow-net` after the script argument. It's too hacky to make work with clap. - Remove `--v8-options`, instead use `--v8-flags=--help` - Give more descriptive names to unit tests in flags.rs - Assume argv and subcommand into DenoFlags struct so the output of flags module is only DenoFlags rather than the tuple (subcommand, flags, argv). - Improve CLI help text - Make `deno run` specific args like `--allow-net` only show up in 'deno help run' instead of as global flags in `deno help`. - Removes `deno version` to simplify our implementation and be closer to clap defaults. `deno -V` now only shows Deno's version and not V8's nor TypeScript. `Deno.versions` can be used to see that information. - Prevent clap from auto-detecting terminal width and attempting to wrap text.
- Remove ability to specify run arguments like `--allow-net` after the script argument. It's too hacky to make work with clap. - Remove `--v8-options`, instead use `--v8-flags=--help` - Give more descriptive names to unit tests in flags.rs - Assume argv and subcommand into DenoFlags struct so the output of flags module is only DenoFlags rather than the tuple (subcommand, flags, argv). - Improve CLI help text - Make `deno run` specific args like `--allow-net` only show up in 'deno help run' instead of as global flags in `deno help`. - Removes `deno version` to simplify our implementation and be closer to clap defaults. `deno -V` now only shows Deno's version and not V8's nor TypeScript. `Deno.versions` can be used to see that information. - Prevent clap from auto-detecting terminal width and attempting to wrap text.
- Remove ability to specify run arguments like `--allow-net` after the script argument. It's too hacky to make work with clap. - Remove `--v8-options`, instead use `--v8-flags=--help` - Give more descriptive names to unit tests in flags.rs - Assume argv and subcommand into DenoFlags struct so the output of flags module is only DenoFlags rather than the tuple (subcommand, flags, argv). - Improve CLI help text - Make `deno run` specific args like `--allow-net` only show up in 'deno help run' instead of as global flags in `deno help`. - Removes `deno version` to simplify our implementation and be closer to clap defaults. `deno -V` now only shows Deno's version and not V8's nor TypeScript. `Deno.versions` can be used to see that information. - Prevent clap from auto-detecting terminal width and attempting to wrap text.
--allow-net
after the script argument. It's too hacky to make work with clap.--v8-options
, instead use--v8-flags=--help
deno run
specific args like--allow-net
only show up in 'denohelp run' instead of as global flags in
deno help
.deno version
to simplify our implementation and be closer to clap defaults.deno -V
now only shows Deno's version and not V8's nor TypeScript.Deno.versions
can be used to see that information.