Skip to content
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

s/nix style/v2-build/ in the documentation #6105

Open
phadej opened this issue Jun 23, 2019 · 13 comments
Open

s/nix style/v2-build/ in the documentation #6105

phadej opened this issue Jun 23, 2019 · 13 comments

Comments

@phadej
Copy link
Collaborator

phadej commented Jun 23, 2019

I conjecture that mentioning Nix only adds confusion. Almost all people I know use v2-build (well actually they use new-build, but maybe v2-build is a bit better).

E.g.

  • One of the primary innovations of Nix-style local builds is the distinction between local packages, which users edit and recompile and must be built per-project, versus external packages, which can be cached across projects.
  • One of the primary innovations of v2-build local builds is the distinction between local packages, which users edit and recompile and must be built per-project, versus external packages, which can be cached across projects.
@phadej
Copy link
Collaborator Author

phadej commented Jun 23, 2019

An example of confusion: Nix store can (and does) mean /nix/store for a lot of people.

@23Skidoo
Copy link
Member

Agreed.

@fgaz
Copy link
Member

fgaz commented Jun 26, 2019

+1, but it should also mention the other temporary names (nix-style local builds, new-*) so that at least it shows up in searches

@hvr
Copy link
Member

hvr commented Jun 26, 2019

But do we want to keep referring to v2-build forever? I assumed we'd phase out the term v2-build to become cabal build, at which point referring to it as v2-build will be more confusing than using the term we've been advertising this feature ever since cabal 1.24 (the term "new-build" and "v2-build" have been rather ephemeral in contrast to the term "nix-style local builds" which has been a constant throughtout time). And I've myself been referring to new-build and v2-build frequently also as "Nix-style" where it made sense (specifically when talking about the nix-style store)

I for one intend to keep referring to "Nix-style {store,hash,build}" (with an emphasis on "-style") where I refer to the concept related to the Nix-style store/hashes, as well as start to slowly phase out my use of "new-build" and "v2-build" in favor of just saying cabal {build,install,*} when I intend to refer to specific commands over the next couple years. In fact, I think it'll cause a lot more confusion to keep talking about the transitional v2-build or new-build terms after cabal 3.0, which is supposed to make the new-* and v2-* prefixes merely a historical artifact which a newcomer coming to cabal 3.0 ought not even need to know about!

@phadej
Copy link
Collaborator Author

phadej commented Jun 26, 2019

I think @hvr did veto this. Nix-style it is.

For the future: don't use number, nor new, not foo-like "relative" references. Find some fancy word, the first thing you'll pick will stick.

@phadej phadej closed this as completed Jun 26, 2019
@phadej phadej reopened this Jun 26, 2019
@phadej
Copy link
Collaborator Author

phadej commented Jun 26, 2019

Actually no.

https://cabal.readthedocs.io/en/latest/nix-local-build-overview.html starts with

Nix-style local builds are a new build system implementation inspired by Nix. The Nix-style local build system is commonly called “v2-build” for short.

That needs to be changed in the way or another. Either

  1. we avoid "v2-build" and use nix-style in non-command-name context
  2. or "v2-build" is used in place of informal "nix-style"

Having consistent language would make documentation more polished almost for free.

@hvr
Copy link
Member

hvr commented Jun 26, 2019

well, note that

... commonly called “v2-build” for short....

was changed into that wording (back then still for new-build; the rename to v2-build was more recent) in 2017 via c692831 with the express intent to

The goal is to deemphasize calling it "new-build" and push "Nix-style Local
Builds" instead, as the former name only makes sense while the old system
is the default

-``cabal new-build``, also known as Nix-style local builds, is a new
-command inspired by Nix that comes with cabal-install 1.24. Nix-style
-local builds combine the best of non-sandboxed and sandboxed Cabal:
+Nix-style local builds are a new build system implementation inspired by Nix.
+The Nix-style local build system is commonly called "new-build" for short after the ``cabal new-*`` family of commands that control it.
+However those names are only temporary until Nix-style local builds becomes the default.

and also note specifically

However those names are only temporary until Nix-style local builds becomes the default.

@phadej
Copy link
Collaborator Author

phadej commented Jun 26, 2019

Sorry, let me rephrase:

Nix-style local builds have become the default, so some more editing is needed there

@simonmichael
Copy link

simonmichael commented Aug 14, 2021

Adding my 2c as requested by #haskell (and my apologies, it really is 2c or less, I'm not here to work on this). While they arose for understandable reasons, nowadays both "nix-style" and "v2-build" just create confusion for non-experts:

  • v1 vs v2 baked prominently into UI for a long time was always going to be confusing
  • nix-style is increasingly confusing as it has nothing to do with the 3+ ways of using cabal with actual nix.

IMHO it would be good for cabal if they were both discontinued ASAP (this issue was mainly about removing the "nix style" term). It would take 1. sustained consistent effort across all docs/uis/fora, and 2. a new replacement term that is sticky and liked by both the devs and new users.

@simonmichael
Copy link

simonmichael commented Aug 14, 2021

I think "v1-style build" covers two build/package management strategies:

  1. the first: "global", "shared", "user-wide" ?
  2. the second: "sandboxed", "per-project without sharing"

And "v2/nix style" covers:

  1. the third: could be called "hermetic", "isolated", "self-contained" (but those also describe 2), "per-project with sharing", "reproducible", "reusable", "immutable"...

@gbaz
Copy link
Collaborator

gbaz commented Aug 14, 2021

i was suggesting neutral terms might be "packagedb-style builds" (for v1) and "store-style builds" (for v2) since this refers to where the packages live, rather than any descriptors of how stuff works.

@simonmichael
Copy link

simonmichael commented Aug 14, 2021

packagedb vs store is informative to cabal developers, but not to users.

Ultimately it needs to be three easy words for the three cases. Currently I'd favour

  1. "global" (everything's in one big package db, packages can be mutated causing conflicts)
  2. "sandboxed" (each project has it's own private package db)
  3. "immutable" (global and private package dbs are used, packages are never mutated)

@Mikolaj
Copy link
Member

Mikolaj commented Aug 14, 2021

Agreed about getting rind of "nix". I think the "sandboxed" style is completely removed, right? No longer possible. So, nothing wrong with the term, but it should probably never appear in docs nor codebase (outside old release notes).

The "v1 style", "v2 style" naming has the advantage that there still are, and will be for at least a few months, "v1-" and "v2-" prefixes in command names. There is also the pair "" and "new-", but the first element of the pair is ambiguous.

There is a slight ambiguity with "global", because we are actively working on bringing it back using v2- machinery, because some use cases require it (the tool cabal-env and the idiom of cabal exec cabal foo are partial solutions). So we'd like to enable "global" style usage without the "v1" style commands and the heaps of legacy code behind them.

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

7 participants