Skip to content

Conversation

@eschnett
Copy link
Contributor

The Julia executable allows long-form options (e.g. --optimize) for almost all options. Noticeably missing is a long-form option for -g, and this somehow rubs me the wrong way.

This PR adds long-form options for the two missing cases, --debug and --interactive.

vchuravy
vchuravy previously approved these changes Oct 20, 2022
@PallHaraldsson
Copy link
Contributor

I've never used debug, i.e. -g, but I would like a debug option with some specific other changes, so maybe hold on on --debug? I see -d isn't used, not sure why -g was chosen, was it intentional to not conflict with a later --debug (and -d) option?

@KristofferC
Copy link
Member

Yes, imo we should save --debug for a Julia debug option, e.g. #37874

@vchuravy vchuravy dismissed their stale review October 21, 2022 12:17

--debug for assertion mode

@eschnett
Copy link
Contributor Author

The option is likely called -g because this is the commonly used option name used by Fortran/C/C++ compilers, probably because -d and -D were already taken there. That's probably also the reason that the optimization level is set via an upper case -O.

@eschnett
Copy link
Contributor Author

I renamed the option to --debuginfo.

@eschnett eschnett changed the title Allow long-form --debug option Allow long-form --debuginfo option Oct 21, 2022
@eschnett
Copy link
Contributor Author

eschnett commented Nov 1, 2022

@KristofferC Do you approve if the long name of the -g option is --debuginfo?

@StefanKarpinski
Copy link
Member

I think --debug-info would be more in line with other options.

@fredrikekre fredrikekre changed the title Allow long-form --debuginfo option Allow long-form --debug-info option Nov 3, 2022
@vchuravy vchuravy merged commit 4e2d13f into JuliaLang:master Nov 6, 2022
@eschnett eschnett deleted the eschnett/debug branch August 14, 2023 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants