Skip to content

cabal build and cabal install should emit warnings #4862

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
tomjaguarpaw opened this issue Nov 3, 2017 · 11 comments
Closed

cabal build and cabal install should emit warnings #4862

tomjaguarpaw opened this issue Nov 3, 2017 · 11 comments

Comments

@tomjaguarpaw
Copy link
Member

tomjaguarpaw commented Nov 3, 2017

If we are intending to transition to cabal new-... stuff then cabal build and cabal install should probably emit warnings saying that they are no longer the recommended way to do things.

[This ticket filed as discussed with angerman on Haskell Reddit]

@angerman angerman self-assigned this Nov 3, 2017
@angerman
Copy link
Collaborator

angerman commented Nov 3, 2017

Thanks!

@23Skidoo, @hvr any objections to adding warnings when using the "old" commands?

@23Skidoo 23Skidoo added this to the 2.2 milestone Nov 3, 2017
@23Skidoo
Copy link
Member

23Skidoo commented Nov 3, 2017

Yep, it makes sense to add a warning in 2.2, but there should be an option to turn it off. I suggest something along the following lines:

Warning: The behaviour of this command will change in the upcoming 3.0 release. 
To read more about the upcoming changes, see <https://URL>. If you want to try 
the new behaviour right now, use the new-{build,install,test} set of commands 
instead of this one.
To turn this warning off permanently, add 'disable-new-build-warning: True' to your 
'~/.cabal/config' file.

@angerman
Copy link
Collaborator

angerman commented Nov 4, 2017 via email

@tomjaguarpaw
Copy link
Member Author

I don't know what you generally do for your deprecation process or what you planned for this functionality, but have you considered adding old-build and old-install and mentioning in the warning for build and install that they should use old-build and old-install if they want to preserve the behaviour in the next version?

@tomjaguarpaw
Copy link
Member Author

That might make the transition easier.

@hvr
Copy link
Member

hvr commented Nov 4, 2017

@tomjaguarpaw tbh, it'd be great (at least that's the thing I can't wait to do) if we could get rid of the old codepaths asap in order to allow us to radically refactor and make the code-base less confusing and easier to develop/maintain (also, old-build codepaths will quickly bitrot once we start defaulting to new-build); which would mean to get rid of the old-* commands with cabal 3.0 ideally. If you need the old-build commands, you can just install cabal < 3 imho.

@tomjaguarpaw
Copy link
Member Author

@hvr That's fair enough. I'll slightly refine my suggestion then: whilst the old behaviour still exists add old-.. aliases for it (that don't warn).

@hvr
Copy link
Member

hvr commented Mar 14, 2018

@23Skidoo please don't forget about this one!

@23Skidoo 23Skidoo self-assigned this Mar 15, 2018
@fgaz
Copy link
Member

fgaz commented Jun 17, 2018

@typedrat isn't this done?

@typedrat
Copy link
Collaborator

I forgot to close it.

@typedrat
Copy link
Collaborator

See #5358, #5378.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants