Skip to content

Warn quoted component name - #12223

Open
leana8959 wants to merge 6 commits into
haskell:masterfrom
leana8959:warn-quoted-component-name
Open

Warn quoted component name#12223
leana8959 wants to merge 6 commits into
haskell:masterfrom
leana8959:warn-quoted-component-name

Conversation

@leana8959

@leana8959 leana8959 commented Aug 8, 2026

Copy link
Copy Markdown
Collaborator

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

Thanks!

Comment thread changelog.d/12223.md Outdated
Comment thread changelog.d/12223.md Outdated
leana8959 and others added 2 commits August 8, 2026 18:04
Co-authored-by: ffaf1 <fa-ml@ariis.it>
@jappeace

jappeace commented Aug 8, 2026

Copy link
Copy Markdown
Collaborator

The warning here will tell users to stop doing this in their own development environment (effectively deprecating it).

I suggest we make cabal check error on quoted components so that we at least aren't allowed to upload new packages with quotes to hackage.

@leana8959

Copy link
Copy Markdown
Collaborator Author

According to the deprecation process, I would only be able to add the warning in the N+1 release?

Comment thread changelog.d/12223.md
@zlonast

zlonast commented Aug 22, 2026

Copy link
Copy Markdown
Collaborator

LLM said:

The deprecation process is for working features we plan to remove — it warns in N+1 after introducing an alternative in N. A quoted name with spaces was never referencable in build-depends or the CLI, so warning about it is just a diagnostic and can go in now.

But the warning currently fires on every quoted name, including harmless ones like library "quoted" in the test — and the code comment says "are to be removed". Removing quoted names without spaces would be a real deprecation. I'd scope the warning to names that actually contain a space (that's the case people need the warning for), and drop the "to be removed" wording.

@leana8959

Copy link
Copy Markdown
Collaborator Author

I think we should discuss further regarding how to do the warning.

To resume:

  • (jappie) only in cabal check, warn every quoted component name
  • (me) during parsing, warn every quoted component name

@zlonast What's your opinion on this? During parsing but only warn quoted component names with spaces?


The deprecation process is for working features we plan to remove

I read the deprecation process document. It doesn't specify working features. Could you point me to it?

it warns in N+1 after introducing an alternative in N.

If I understand correctly, N is the current release, N+1 is the next one. If we were to merge my patch, that would warn in N and not N+1. This is why I asked if my patch is the right approach, given the deprecation process and the fact that I have two approvals.

A quoted name with spaces was never referencable in build-depends or the CLI, so warning about it is just a diagnostic and can go in now.
But the warning currently fires on every quoted name, including harmless ones like library "quoted" in the test — and the code comment says "are to be removed". Removing quoted names without spaces would be a real deprecation. I'd scope the warning to names that actually contain a space (that's the case people need the warning for), and drop the "to be removed" wording.

This will be discussed, as we clearly haven't reached a consensus on how to remove this misfeature.
I would like to see the quotes to no longer allowed as well, as they bear no extra meaning in this context and there are only 78 of them on hackage.


On a personal note:

The LLM response is undermining my desire to contribute to Cabal in my personal time. It is disrespectful because it removes the human element from the process. I appreciate the time you take to review my PR, and I kindly ask you to not respond to me by citing LLM generated output.

@zlonast

zlonast commented Aug 22, 2026

Copy link
Copy Markdown
Collaborator

I think we can merge this now and just wait for two more releases.

Release N is 3.18.0.0 (Include deprecation notice in the changelog)
Release N + 1 is 3.20.0.0 (Show a warning when the command is used)
Release N + 2 is 3.22.0.0 (Remove code) or wait more
Release N + 3 is 3.24.0.0 (Remove code)

If we interpret the N release as 3.20.0.0, then I'm not sure why we need to warn only through the changelog, which few people read.

I think since the alternative functionality already exists, we are not interested in step N as 3.20.0.0.

Release N is old (Introduce alternative)
Release N + 1 is 3.20.0.0 (Alternative is recommended)
Release N + 2 is 3.22.0.0 (Alternative implements the old interface when applicable)
Release N + 3 is 3.24.0.0 (Alternative takes over)

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.

4 participants