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

restructure attribute listing to derivation #7320

Merged
merged 9 commits into from
Sep 25, 2023

Conversation

fricklerhandwerk
Copy link
Contributor

@fricklerhandwerk fricklerhandwerk commented Nov 18, 2022

Motivation

The most important part of the language is still documented somewhat sparsely, in somewhat dense language. This is a first step to provide some more predictable structure that is easier to parse.

Context

We still need many more examples and cross-links. This PR starts out on just the structure and the essentials.

Checklist for maintainers

This work is sponsored by Antithesis

@fricklerhandwerk
Copy link
Contributor Author

@Ericson2314 commented:

Building is strictly speaking store derivation -> store object (without using cache). I wouldn't include evaluation. nix build doing evaluation too is a porcelain convenience that shouldn't effect the definition of "building".

doc/manual/src/glossary.md Outdated Show resolved Hide resolved
doc/manual/src/glossary.md Outdated Show resolved Hide resolved
@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/tweag-nix-dev-update-40/23480/1

@Ericson2314
Copy link
Member

More broadly, I think if we have #4543 then the DerivedPath type (in the code, and in my NixCon talk) will finally be directly use-visible, and I think that in turn will unlock what I think are some big improvements in being able to explain things.

@tomberek
Copy link
Contributor

notes from meeting:

realization

"Ensure a store path is valid (it and all of its transitive dependencies are in the store); either a derivation's output, or the store path itself if provided directly. When used with a derivation, Nix will either build or substitute the necessary store paths. When used directly with a store path, the necessary store paths will only be substituted, if available."

Two cases:

  1. derivation ---(via building or substitution) ----> storePath is valid in a store
  2. store path ---(via substitution) ---------------------> storePath is valid in a store

This operation will fail if the supplied derivation/store paths cannot be created by either building or substitution.

valid: this is a property of a store path in a store which ensures it and all transitive references to other store paths are readable using that store (for example: on a local FS store this means "on disk").... WIP

@fricklerhandwerk
Copy link
Contributor Author

fricklerhandwerk commented Dec 19, 2022

Discussed in Nix team meeting 2022-12-19:

  • @edolstra: there should instead be a separate section about the store
  • @edolstra: merge it as is and move around the information when there is a better place
  • (some discussion over wording of the precise definition of validity)
  • @tomberek: we should focus on what's a blocker to merging and split out tangential considerations into issues or follow-up PRs
  • @fricklerhandwerk: will rework the wording of definitions according to discussion outcome

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/2022-12-19-nix-team-meeting-minutes-18/24121/1

@fricklerhandwerk fricklerhandwerk marked this pull request as draft January 19, 2023 14:37
@dpulls
Copy link

dpulls bot commented Feb 7, 2023

🎉 All dependencies have been resolved !

@fricklerhandwerk fricklerhandwerk changed the title define "build" restructure attribute listing to derviation Jul 18, 2023
@fricklerhandwerk fricklerhandwerk changed the title restructure attribute listing to derviation restructure attribute listing to derivation Jul 18, 2023
@fricklerhandwerk fricklerhandwerk marked this pull request as ready for review July 18, 2023 12:07
@Ericson2314
Copy link
Member

I think you have another PR's text stuck in here?

@fricklerhandwerk
Copy link
Contributor Author

Ah yeah the force push didn't get through. Will clean it up when I get back to a keyboard.

@fricklerhandwerk
Copy link
Contributor Author

The build failing on linkcheck is very weird, as the highlighted link is actually correct. Checked with @roberth.

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/2023-08-21-nix-team-meeting-minutes-81/32082/1

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/2023-08-28-nix-team-meeting-minutes-83/32290/1

@fricklerhandwerk
Copy link
Contributor Author

Any blockers for merging this?

Copy link
Member

@Ericson2314 Ericson2314 left a comment

Choose a reason for hiding this comment

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

Now that I look at the rendered view, I see how much this is just a pure reorg. Let's just merge it and worry about content changes separately.

After all, what really should happen is that we rework this content to just be about the store layer, and what is left can just be a much short thing for the builtins.derivation and builtins.derivationStrict primops

doc/manual/src/language/derivations.md Outdated Show resolved Hide resolved
doc/manual/src/language/derivations.md Outdated Show resolved Hide resolved
doc/manual/src/language/derivations.md Show resolved Hide resolved
doc/manual/src/language/derivations.md Outdated Show resolved Hide resolved
doc/manual/src/language/derivations.md Outdated Show resolved Hide resolved
doc/manual/src/language/derivations.md Outdated Show resolved Hide resolved
doc/manual/src/language/derivations.md Show resolved Hide resolved
doc/manual/src/language/derivations.md Outdated Show resolved Hide resolved
fricklerhandwerk and others added 9 commits September 26, 2023 00:43
Co-authored-by: Robert Hensing <[email protected]>
derivations are about data transformation, so the term "build" does not
add any information. there was also some feedback that "build task" is
not more helpful than "derivation" if you have no prior experience with
Nix or build systems, while existing associations may be misleading.
make the example more realistic, since `headers` is not an output name
used in Nixpkgs

Co-authored-by: Robert Hensing <[email protected]>
@fricklerhandwerk
Copy link
Contributor Author

Merging this after addressing all comments and observing that the review seems to converge to minutiae.

@fricklerhandwerk fricklerhandwerk merged commit b7d88fe into NixOS:master Sep 25, 2023
@fricklerhandwerk fricklerhandwerk deleted the doc-derivation branch September 26, 2023 01:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

6 participants