[ruby-core:117088] [Ruby master Feature#20329] Clean up `--dump` sub-options

Issue #20329 has been reported by nobu (Nobuyoshi Nakada). ---------------------------------------- Feature #20329: Clean up `--dump` sub-options https://bugs.ruby-lang.org/issues/20329 * Author: nobu (Nobuyoshi Nakada) * Status: Open ---------------------------------------- Currently we have 5 options for `--dump` command line option. * insns * insns_without_opt * yydebug(+error-tolerant) * parsetree(+error-tolerant) * parsetree_with_comment(+error-tolerant) Among these, `insns_without_opt` is a variant of `insns`, and `parsetree_with_comment` is a variant of `parsetree`. However, there is now another way to specify variants (e.g. `+error-tolerant`). How about unifying the two so that the former can also be specified in the same form, such as `--dump=parsetree+comment+error-tolerant`? It also will be able to abbreviate as parse+comm+err` or more. -- https://bugs.ruby-lang.org/

Issue #20329 has been updated by k0kubun (Takashi Kokubun). What will replace `insns`? I don't want to type `insns+opt` every single time. If it stays as is and `insns_without_opt` is changed to `insns-opt` (insns minus opt) or something, I'm good. ---------------------------------------- Feature #20329: Clean up `--dump` sub-options https://bugs.ruby-lang.org/issues/20329#change-107170 * Author: nobu (Nobuyoshi Nakada) * Status: Open ---------------------------------------- Currently we have 5 options for `--dump` command line option. * insns * insns_without_opt * yydebug(+error-tolerant) * parsetree(+error-tolerant) * parsetree_with_comment(+error-tolerant) Among these, `insns_without_opt` is a variant of `insns`, and `parsetree_with_comment` is a variant of `parsetree`. However, there is now another way to specify variants (e.g. `+error-tolerant`). How about unifying the two so that the former can also be specified in the same form, such as `--dump=parsetree+comment+error-tolerant`? It also will be able to abbreviate as parse+comm+err` or more. -- https://bugs.ruby-lang.org/

Issue #20329 has been updated by nobu (Nobuyoshi Nakada). `--dump=insns` will not be changed. Since `+` is the separator, `insns+-opt` will be same as the current `insns_without_opt`. ---------------------------------------- Feature #20329: Clean up `--dump` sub-options https://bugs.ruby-lang.org/issues/20329#change-107176 * Author: nobu (Nobuyoshi Nakada) * Status: Open ---------------------------------------- Currently we have 5 options for `--dump` command line option. * insns * insns_without_opt * yydebug(+error-tolerant) * parsetree(+error-tolerant) * parsetree_with_comment(+error-tolerant) Among these, `insns_without_opt` is a variant of `insns`, and `parsetree_with_comment` is a variant of `parsetree`. However, there is now another way to specify variants (e.g. `+error-tolerant`). How about unifying the two so that the former can also be specified in the same form, such as `--dump=parsetree+comment+error-tolerant`? It also will be able to abbreviate as parse+comm+err` or more. -- https://bugs.ruby-lang.org/

Issue #20329 has been updated by eightbitraptor (Matthew Valentine-House). I don't feel particularly strongly about this, but something about have `+-` in the argument feels a little clunky to me. I understand the desire to not change the existing options like `--dump=insns`, and that we've got ourselves into a state where we have both `with` and `without`, but what about if we changed the `+` to `,` - similar to how you pass options to the linker through gcc. Something like: ``` dump=insns dump=insns,-opt dump=parsetree,+error-tolerant,+comment dump=yydebug,+error_tolerant ...etc... ``` ---------------------------------------- Feature #20329: Clean up `--dump` sub-options https://bugs.ruby-lang.org/issues/20329#change-107206 * Author: nobu (Nobuyoshi Nakada) * Status: Open ---------------------------------------- Currently we have 5 options for `--dump` command line option. * insns * insns_without_opt * yydebug(+error-tolerant) * parsetree(+error-tolerant) * parsetree_with_comment(+error-tolerant) Among these, `insns_without_opt` is a variant of `insns`, and `parsetree_with_comment` is a variant of `parsetree`. However, there is now another way to specify variants (e.g. `+error-tolerant`). How about unifying the two so that the former can also be specified in the same form, such as `--dump=parsetree+comment+error-tolerant`? It also will be able to abbreviate as `parse+comm+err` or more. -- https://bugs.ruby-lang.org/

Issue #20329 has been updated by nobu (Nobuyoshi Nakada). eightbitraptor (Matthew Valentine-House) wrote in #note-4:
``` dump=insns dump=insns,-opt dump=parsetree,+error-tolerant,+comment dump=yydebug,+error_tolerant ...etc... ```
This looks nice. Would `--dump=insns --dump=-opt` have the same effect with `--dump=insns,-opt`? ---------------------------------------- Feature #20329: Clean up `--dump` sub-options https://bugs.ruby-lang.org/issues/20329#change-107298 * Author: nobu (Nobuyoshi Nakada) * Status: Open ---------------------------------------- Currently we have 5 options for `--dump` command line option. * insns * insns_without_opt * yydebug(+error-tolerant) * parsetree(+error-tolerant) * parsetree_with_comment(+error-tolerant) Among these, `insns_without_opt` is a variant of `insns`, and `parsetree_with_comment` is a variant of `parsetree`. However, there is now another way to specify variants (e.g. `+error-tolerant`). How about unifying the two so that the former can also be specified in the same form, such as `--dump=parsetree+comment+error-tolerant`? It also will be able to abbreviate as `parse+comm+err` or more. -- https://bugs.ruby-lang.org/

Issue #20329 has been updated by eightbitraptor (Matthew Valentine-House). nobu (Nobuyoshi Nakada) wrote in #note-5:
This looks nice.
Would `--dump=insns --dump=-opt` have the same effect with `--dump=insns,-opt`?
I don't have strong opinions about this, but it seems like a good idea. ---------------------------------------- Feature #20329: Clean up `--dump` sub-options https://bugs.ruby-lang.org/issues/20329#change-107299 * Author: nobu (Nobuyoshi Nakada) * Status: Open ---------------------------------------- Currently we have 5 options for `--dump` command line option. * insns * insns_without_opt * yydebug(+error-tolerant) * parsetree(+error-tolerant) * parsetree_with_comment(+error-tolerant) Among these, `insns_without_opt` is a variant of `insns`, and `parsetree_with_comment` is a variant of `parsetree`. However, there is now another way to specify variants (e.g. `+error-tolerant`). How about unifying the two so that the former can also be specified in the same form, such as `--dump=parsetree+comment+error-tolerant`? It also will be able to abbreviate as `parse+comm+err` or more. -- https://bugs.ruby-lang.org/
participants (3)
-
eightbitraptor (Matthew Valentine-House)
-
k0kubun (Takashi Kokubun)
-
nobu (Nobuyoshi Nakada)