Skip to content

fix(Cabal): Do not pass -optJSP to GHC < 9.10.2 - #12398

Open
zlonast wants to merge 2 commits into
haskell:masterfrom
zlonast:zlonast/no-optJSP-before-9.12
Open

zlonast wants to merge 2 commits into
haskell:masterfrom
zlonast:zlonast/no-optJSP-before-9.12

Conversation

@zlonast

@zlonast zlonast commented Sep 30, 2026 •

Copy link
Copy Markdown
Collaborator

The jspp-options field is rendered as ghc -optJSP<opt>, but that flag only exists since GHC 9.10.2, so a package using jspp-options could not be built at all with GHC < 9.10.2.


Template Α: This PR modifies behaviour or interface

Include the following checklist in your PR:

hummbl-dev

This comment was marked as spam.

@zlonast
zlonast force-pushed the zlonast/no-optJSP-before-9.12 branch from 7ad37df to 688c9c7 Compare October 7, 2026 17:49
@zlonast zlonast changed the title fix(Cabal): Do not pass -optJSP to GHC < 9.12 fix(Cabal): Do not pass -optJSP to GHC < 9.10.2 Oct 7, 2026
@zlonast
zlonast force-pushed the zlonast/no-optJSP-before-9.12 branch 2 times, most recently from 4c868e2 to 4f4782a Compare October 7, 2026 17:52

@leana8959 leana8959 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.

Would it be helpful to warn the user when the flag is not passed to GHC?

zlonast added a commit to zlonast/cabal that referenced this pull request Nov 4, 2026
Review feedback on haskell#12398: 'renderGhcOptions' now omits -optJSP for older
compilers, which would silently ignore the user's jspp-options. Emit a
build-time warning in that case, naming the compiler version found. Also
rename the ghc912 binding (leftover from the original PR title) to
jsppSupported.

Co-authored-by: Léana <leana.jiang+git@icloud.com>
@zlonast

zlonast commented Nov 4, 2026

Copy link
Copy Markdown
Collaborator Author

@leana8959 I like your idea

"Ignoring 'jspp-options': -optJSP is only supported by GHC 9.10.2 and later (found GHC "
++ prettyShow v
++ ")"
_ -> return ()

@leana8959 leana8959 Nov 4, 2026 •

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.

Maybe we should also warn in the case where we don't know the compiler used (Nothing)? It is currently inconsistent with the filtering in the other file.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

done

@mergify mergify Bot added the 👻 haunting the review queue Set by Mergify: no review from anyone with write access two weeks after opening label Nov 6, 2026
andreabedini and others added 2 commits November 7, 2026 21:29
Review feedback on haskell#12398: 'renderGhcOptions' now omits -optJSP for older
compilers, which would silently ignore the user's jspp-options. Emit a
build-time warning in that case, naming the compiler version found, and
likewise when the compiler version is unknown. Also rename the ghc912
binding (leftover from the original PR title) to jsppSupported.

Co-authored-by: Léana <leana.jiang+git@icloud.com>
@zlonast
zlonast force-pushed the zlonast/no-optJSP-before-9.12 branch from 9fa00e4 to d6c13ac Compare November 7, 2026 13:29
@mergify mergify Bot removed the 👻 haunting the review queue Set by Mergify: no review from anyone with write access two weeks after opening label Nov 7, 2026
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.

4 participants