Skip to content

Remove v2- prefix from command, package, and project docs. #6703

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

Conversation

m-renaud
Copy link
Collaborator

The v2- style commands have been default since version 3.0.0.0, so when looking at the latest version of the docs it should assume the defaults. I left the explicit v2- prefix in the nix-style docs since it is explicitly discussing the difference between the old and new style commands, and also because there is (was?) ongoing discussion about what prefix (if any) to use in #6105.

Also fix some small errors in the text.

This partially addresses #6194 and #6213.

@phadej
Copy link
Collaborator

phadej commented Apr 12, 2020

Does all documentation which talks about v1- commands, explicitly has v1- prefix? I think that should be checked first.

@m-renaud
Copy link
Collaborator Author

I went through all the docs and didn't see anything that was clearly v1 that should be prefixed, afaik the usages were all pretty generic. Of course there's tonnes of options documentation which may or may not all work for v2 commands, but trying out every single option I'd say is out of scope.

The v2- style commands have been default since version 3.0.0.0, so when looking
at the latest version of the docs it should assume the defaults. I left the
explicit v2- prefix in the nix-style docs since it is explicitly discussing the
difference between the old and new style commands.

Also fix some small errors.
@m-renaud m-renaud force-pushed the m-renaud-docs-remove-v2-prefix branch from 07cce4e to f6b7736 Compare April 12, 2020 22:02
@phadej
Copy link
Collaborator

phadej commented Apr 12, 2020

If it doesn't say explicitly either, and is not clearly v2- then I think we should first make a change to prefix everything we are not sure about to v1-.

I don't want end in situation where we have (implicitly) v2- documentation which actually doesn't work. I don't remember anything outside specifically nix-style documentation to be so.

we should emphasize (using different words though) that similarities between v1-build and v2-build are almost as accidental as similarities between cabal build and stack build. You cannot just change one to another and expect that things continue to work. They might, but it is far from guaranteed.


I think that we should be explicit about the prefix for as long as possible (i.e. v1- commands are around). It's not pretty, but it is explicit.

@phadej
Copy link
Collaborator

phadej commented Apr 12, 2020

I also want mention that a person ranted today on #hackage that cabal broke everything by changing what build command does. So there are people "stuck" in v1-build. I think it's better if there is longer period when Cabal manual doesn't talk about prefixless build command at all. (We should have done that edit many years ago, but ...). Not to mention that there are no progress on #6104. We should not concentrate solely on beginner (who start "fresh") needs

@m-renaud
Copy link
Collaborator Author

If it doesn't say explicitly either, and is not clearly v2- then...

Most of the pages in the docs don't reference commands at all, the commands in:

  • Sections 1-4 all work with the v2 commands (and are relatively surface level commands, see here, here, and here,
  • Section 5 explicitly has prefixes because it's explicitly talking about the difference with the old system
  • Section 6 is specifically about the cabal-install commands of the current version of the cabal-install tool you're looking at the docs for
  • Section 7 is about the cabal package format and only has references to bare cabal build|run|repl|test|benchmark with no options.
  • Section 8 is cabal project file reference (very few cabal command references, all simple invocations)
  • Section 9 is Setup.hs (remains unchanged since it refers explicitly to runhaskell Setup.hs)
  • Section 10 is file format history (no commands)
  • Section 11 is field syntax description (no commands)
  • Section 12 is how to report bugs (no commands)
  • Section 13 is Nix Integration, which is affected but has an explicit note at the top
    • "This functionality doesn’t work with nix-style builds. Nix-style builds are not related to Nix integration."

I also want mention that a person ranted today on #hackage that cabal broke everything by changing what build command does

I sympathize, but I don't see exactly how its relevant to how the docs for the most recent release of the tool should be written. If someone is using an older version of cabal (or at least an older version's functionality) then they should (and can) look at docs for a previous release, that's why docs are versioned as well.

We should not concentrate solely on beginner (who start "fresh") needs

This doesn't really have anything to do with beginners, if you're looking at v: latest docs, the docs should reflect the current state of the latest release of the tool, not a conglomeration of all previous versions and mismatches in semantics, historical notes, etc.

we should emphasize (using different words though) that similarities between...

How about this: I think one way of doing this would be to put a NOTE at the start of Section 6 (cabal-install Commands, since that's the only one that actually has any details about the commands or their arguments) that states something along the lines of: "If you are using the old/v1-style build infrastructure, please take a look at the docs for version X.Y (and link)." I agree there should be some place that calls out the difference between the old and new style, but that legacy shouldn't be littered throughout every single page of the docs.

The docs have been languishing for months (years?) and it seems to be because there's a desire to have the docs be 100% perfect for v2-style before making any changes, but I'd argue the current incredibly outdated version of the docs at head is more harmful. Yes, documentation gets out of date with code, and as a result we should be reactive to fix it whenever issues are discovered. I'd really like to see the docs get better, but without concrete feedback on what you'd like to see I'm not sure if there's much else I can do.

@phadej
Copy link
Collaborator

phadej commented Apr 12, 2020

I don't think that having v2- prefixes is littering with legacy, it's about being explicit.

I'd like @hvr and @23Skidoo to comment, as we two are not in agreement.

@m-renaud
Copy link
Collaborator Author

Yeah that sounds good, I'm fine with whatever the decision is, just wanted to lay out my line of thinking. Agreed that Herbert and Mikhail should definitely be involved, are there other individuals or groups that we should reach out to about general structure of the docs? How widely do you think we should open up the discussion?

@m-renaud
Copy link
Collaborator Author

It's been over a year since this PR was opened. At this point the v2- commands are ubiquitous so having them be explicit seems irrelevant now. Wdyt?

@Mikolaj
Copy link
Member

Mikolaj commented May 29, 2021

@m-renaud: I'm afraid you are right. I have scripts that mention v2- explicitly so, while I'm fine to change the scripts, it's too late to prevent creating such scripts by not mentioning v2- in the docs or discouraging their use.

OTOH, obviously at some point v1- commands will vanish and, probably later or perhaps at the same time, the v2- aliases will too, so perhaps in-between is a good time to remove v2- from documentation.

@jneira
Copy link
Member

jneira commented Feb 14, 2022

maybe it is time to reconsider merge this @Mikolaj ?

@Mikolaj
Copy link
Member

Mikolaj commented Feb 14, 2022

maybe it is time to reconsider merge this @Mikolaj ?

I won't object.

@andreasabel, @gbaz, @fgaz, other wonderful devs, what do you think?

@andreasabel
Copy link
Member

I am rather with @phadej (in his April 2020 incarnation). Could we do the following?

  • Change the docs so that every command is either prefixed with v1- or v2-.
  • Wait some more.
  • Then (after v1 has disappeared or truly marginalized) find-and-replace v2- by nothing.

@fgaz
Copy link
Member

fgaz commented Feb 16, 2022

@andreasabel there's basically no trace of v1- in the docs though

@Mikolaj
Copy link
Member

Mikolaj commented Feb 16, 2022

* Then (after `v1` has disappeared or truly marginalized) find-and-replace `v2-` by nothing.

I don't think v1 is going away any time soon, so I don't think we should let it block stuff. Whether it's marginalized would be a hotly debated topic as long as it stays in.

I guess v1 should almost never appear in documentation (just in lists of commands, marked as a backward compatibility for legacy workflows that can't be (easily or at all) expressed with the new idiom). So rather than marking its appearances in docs with v1-, the documentation fragment in question should be modernized to how v2- operates IMHO.

@ulysses4ever
Copy link
Collaborator

My 2c. Working in academia, I care about newcomer experience a lot. From this standpoint, my desire is to have v2 prefixes hidden in the docs most of the time. This change can be augmented with a separate section on history and explanation of v1 vs v2, and a section on v1. The rest of docs mention no prefixes and describing the today’s default (which is v2) without mentioning the legacy (v2 implicitly references the legacy in today’s doc).

@Mikolaj
Copy link
Member

Mikolaj commented Feb 21, 2022

So what's the action plan? Could the patrons that have reservations about this PR have a look at the docs and suggest concrete additional improvements that need to be done before this can be merged? Would some disclaimers and links in strategic places informing about the existence of v1- and that v2- is now the default be a good enough precaution?

@gbaz
Copy link
Collaborator

gbaz commented Feb 22, 2022

At this point, I think v2- usage is widespread enough that we can merge this PR. Anyone that still wants to use v1 by now knows it exists and knows how it works.

@jneira
Copy link
Member

jneira commented Feb 24, 2022

@m-renaud thanks for the pr and your persistence, would be too much asking for a final rebase?

Copy link
Member

@jneira jneira left a comment

Choose a reason for hiding this comment

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

lgtm, thanks again!

@Mikolaj
Copy link
Member

Mikolaj commented Feb 25, 2022

Right, we haven't heard any loud objections so once this is rebased, we should merge and handle any fallout afterwards. Move fast and break things. ;)

@jneira
Copy link
Member

jneira commented Mar 1, 2022

Superseeded by #8020 to merge changes done here asap, thanks again @m-renaud!

@jneira jneira closed this Mar 1, 2022
@Mikolaj
Copy link
Member

Mikolaj commented Mar 1, 2022

Citing @jneira from the new PR: Like all prs a rendered version of changed docs can be chacked here: https://cabal--8020.org.readthedocs.build/en/802

We are going to merge soon (1 more review required). Please kindly have a look and start fixing whatever's missing in the new version.

jneira added a commit that referenced this pull request Mar 10, 2022
Rebased version of #6703: Remove v2- prefix from command, package, and project docs.
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.

8 participants