Skip to content

fix(Cabal): Moves the short -g option from --ghc to --enable-debug-info - #12201

Open
zlonast wants to merge 4 commits into
haskell:masterfrom
zlonast:zlonast/remove-g-option
Open

zlonast wants to merge 4 commits into
haskell:masterfrom
zlonast:zlonast/remove-g-option

Conversation

@zlonast

@zlonast zlonast commented Aug 2, 2026 •

Copy link
Copy Markdown
Collaborator

fix: #2056

I think we can simply redefine the flag, and few people will notice, since it doesn't appear in libraries or executables.

Those who do notice will now use the full flag. As I understand it, these are the people who manually enter flags in the console.

Currently, this is mostly LLM, which makes this change even more valuable for them.


Template Α: This PR modifies behaviour or interface

Include the following checklist in your PR:

@jappeace jappeace left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good.

question: why would you ever set a flag to compile with ghc?

@zlonast

zlonast commented Aug 16, 2026

Copy link
Copy Markdown
Collaborator Author

In general, this simply gives the compiler a choice. In the case of ghc, it is always selected by default. We try not to be tied to a single compiler.

@zlonast
zlonast force-pushed the zlonast/remove-g-option branch 2 times, most recently from c7efeb1 to 5e9712e Compare August 22, 2026 09:24
@zlonast zlonast added the re: flag Concerning user-defined flags in cabal files label Aug 23, 2026
@zlonast
zlonast force-pushed the zlonast/remove-g-option branch 2 times, most recently from 6a14b10 to 0cf362f Compare August 24, 2026 09:28
@zlonast
zlonast force-pushed the zlonast/remove-g-option branch from 0cf362f to 91eedda Compare November 4, 2026 07:50

@philderbeast philderbeast left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please move the -g short option in the users guide too:

.. option:: -g, --ghc

.. cfg-field:: debug-info: boolean | integer [0 .. 3]
--enable-debug-info[=n]
--disable-debug-info

Comment thread changelog.d/12201.md Resolved
Comment thread changelog.d/12201.md Resolved
Comment thread changelog.d/12201.md Resolved
Comment thread doc/cmd-v2-help/build.txt Resolved
@zlonast
zlonast force-pushed the zlonast/remove-g-option branch 2 times, most recently from 475b97c to 804c31f Compare November 7, 2026 12:31
zlonast and others added 4 commits November 7, 2026 20:33
@zlonast
zlonast force-pushed the zlonast/remove-g-option branch from 804c31f to 3c4211e Compare November 7, 2026 12:33
@zlonast zlonast changed the title fix(Cabal): Removes the short -g option for the --ghc flag fix(Cabal): Moves the short -g option from --ghc to --enable-debug-info Nov 7, 2026
@zlonast
zlonast requested a review from philderbeast November 7, 2026 16:15
@zlonast zlonast added the 1️⃣ more approval needed Set by Mergify: has one of the two required approvals label Nov 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

attention: needs-review 1️⃣ more approval needed Set by Mergify: has one of the two required approvals re: flag Concerning user-defined flags in cabal files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Repurpose -g to add debug information

3 participants