Skip to content

Allow "bare" dynamic attrs - #194

Closed
shlevy wants to merge 2 commits into
NixOS:masterfrom
shlevy:bare-dynamic-attrs
Closed

shlevy wants to merge 2 commits into
NixOS:masterfrom
shlevy:bare-dynamic-attrs

Conversation

@shlevy

@shlevy shlevy commented Jan 6, 2014

Copy link
Copy Markdown
Member

Now, in addition to a."${b}".c, you can write a.${b}.c (applicable
wherever dynamic attributes are valid).

Now, in addition to a."${b}".c, you can write a.${b}.c (applicable
wherever dynamic attributes are valid).

Signed-off-by: Shea Levy <[email protected]>
@edolstra

edolstra commented Jan 6, 2014

Copy link
Copy Markdown
Member

I'm a bit uncertain about this. On the one hand it doesn't hurt, but on the other hand it doesn't really add much either.

It's also somewhat inconsistent in that elsewhere in the Nix language, ${...} is only accepted inside strings.

@mornfall

mornfall commented Jan 6, 2014

Copy link
Copy Markdown

I like ${foo} as a shorthand for "${foo}", especially in this case, as I can't just write foo (I guess that's what we get for bareword indexing). I suppose it could be even extended to any other context, so it becomes consistent again (this means ${foo} becomes a shorthand for toString foo or somesuch... whatever "${foo}" desugars into).

@shlevy

shlevy commented Jan 6, 2014

Copy link
Copy Markdown
Member Author

shlevy@4bb9b99 implements ${foo} anywhere where strings are allowed

@shlevy

shlevy commented Jan 21, 2014

Copy link
Copy Markdown
Member Author

Seems you merged this, thanks!

@shlevy shlevy closed this Jan 21, 2014
sinanmohd pushed a commit to sinanmohd/nix that referenced this pull request Sep 6, 2025
…ance-tweaks

Parallel eval performance improvements
ConnorBaker added a commit to ConnorBaker/nix that referenced this pull request May 23, 2026
…ards

Adds **Branch:** lines to the 30 catalog entries that landed as commits
on the four cleanup shard branches (libexpr, libstore, libutil,
nix-cli) over the previous batch.

Per-shard tally (commits on each branch beyond the previously-pushed
tip):

- libexpr (HEAD 437eea9 -> +10): NixOS#64, NixOS#66, NixOS#68, NixOS#106, NixOS#107, NixOS#109,
  NixOS#110, NixOS#112, NixOS#196, NixOS#199. Two of the original twelve were skipped on
  rule grounds: NixOS#194 (LookupPath::Elem flatten) — the candidate
  framing claimed the types were internal, but search-path.hh ships
  via install_headers, so collapsing is a public-ABI break, not a
  trivial flatten; NixOS#197 (one-arg findFile drop) — EvalState::lookupPath
  is a private member, so the candidate's "have callers pass it
  explicitly" prescription cannot apply.

- libstore (HEAD 5f5b815 -> +12): NixOS#4, NixOS#5, NixOS#6, NixOS#14, NixOS#47, NixOS#82, NixOS#114,
  NixOS#115, NixOS#119, NixOS#157, NixOS#159, NixOS#165. Several departures from the literal
  prescription, recorded in each commit body and in the per-candidate
  Branch line: NixOS#14 lifted only getRemoteFSAccessor with a
  getLocalNarCacheDir hook (left the trivial getFSAccessor overrides
  per-class); NixOS#115 extracted only the prelude (lockProfile +
  findGenerations) since two callers use stateful reverse iteration;
  NixOS#119 confirmed init's setDefault is a different shape and stayed
  out; NixOS#159 dropped the assert(!childEOF) defensive check after walking
  Goal::handleEOF producers; NixOS#165 used option (b) of the prescription
  (a new derivation-output-fwd.hh) because option (a) would have
  introduced an include cycle.

- libutil (HEAD 784a4f4 -> +3): NixOS#29, NixOS#99, NixOS#117. NixOS#29's commit body
  caveat (XDG_*_HOME / XDG_CONFIG_DIRS reads moved from per-call to
  cached) is recorded on the candidate Branch line.

- nix-cli (HEAD 48524e0 -> +5): NixOS#24, NixOS#77, NixOS#89, NixOS#91, NixOS#187. NixOS#91 shipped
  the GcRootNamer + nameForCurrent consolidation but deferred the
  candidate's addPermRootWithCounter free helper because three
  behavioural differences across call sites (rootNr increment
  position, absPath timing, printGCWarning conditions on store2 null)
  would have either changed user-visible path naming or grown the API.

STATUS.md's cleanup-branches table is updated with each shard's
expanded Addresses list, and the Status column now distinguishes the
already-pushed tips (libfetchers/libflake/libmain remain Pushed since
they got no new commits) from the four shards whose new commits are
local-only.

Push policy is explicit-only — none of the four shard branches has
been pushed past its prior tip.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
ConnorBaker added a commit to ConnorBaker/nix that referenced this pull request May 23, 2026
…ipped)

Update candidate **Branch:** lines for the libexpr cleanup shard
session that landed:

  - NixOS#67  -- primNumeric<NumOp> template behind __add/__sub/__mul/__div
  - NixOS#79  -- iterateFetcherAttrs helper across fetchClosure/fetchMercurial/fetch
            (fetchTree excluded; misclassified in candidate body)
  - NixOS#105 -- CRTP BinOp<Derived> replacing the MakeBinOp/MakeBinOpMembers macros
  - NixOS#214 -- mkFailedFromCurrentException helper for the two recovery dances

And documented skips with source-level reasons:

  - NixOS#63  -- Rule 6: same-shape != same-problem.  parser.y resolves
            relative paths against basePath.path; EvalState::rootPath
            resolves against cwd via absPath().  No behavioural overlap
            and the parser has no EvalState access.
  - NixOS#194 -- Rule 2: search-path.hh ships via install_headers; collapsing
            LookupPath::Prefix/Path/Elem into a single struct is a
            public-API break.
  - NixOS#197 -- Rule 2: eval.hh ships via install_headers; deleting the
            one-arg findFile(string_view) overload is a public-API break.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
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.

3 participants