Skip to content

Test and document builtins.baseNameOf, improve internal baseNameOf()#10306

Merged
thufschmitt merged 3 commits into
NixOS:masterfrom
hercules-ci:baseNameOf
Mar 26, 2024
Merged

Test and document builtins.baseNameOf, improve internal baseNameOf()#10306
thufschmitt merged 3 commits into
NixOS:masterfrom
hercules-ci:baseNameOf

Conversation

@roberth
Copy link
Copy Markdown
Member

@roberth roberth commented Mar 24, 2024

Motivation

baseNameOf is weird. Deal with it.

Context

Found while at code related to #10303

Priorities and Process

Add 👍 to pull requests you find important.

The Nix maintainer team uses a GitHub project board to schedule and track reviews.

@roberth roberth requested a review from edolstra as a code owner March 24, 2024 00:40
@github-actions github-actions Bot added the with-tests Issues related to testing. PRs with tests have some priority label Mar 24, 2024
@Ericson2314
Copy link
Copy Markdown
Member

FWIW programming language standard libraries tend not to remove any slashes:

Perhaps we will eventually (not now!) migrate our internal baseName to work that way too, e.g. as part of #9205. But totally that agreed removing all trailing slashes is more consistent that removing just one.

@thufschmitt thufschmitt merged commit 1394d4e into NixOS:master Mar 26, 2024
@flokli
Copy link
Copy Markdown
Member

flokli commented Apr 20, 2026

This changed hashing behaviour, see https://cl.snix.dev/c/snix/+/31164

@xokdvium
Copy link
Copy Markdown
Contributor

xokdvium commented Apr 20, 2026

It does not, there was a subsequent regression.

@xokdvium
Copy link
Copy Markdown
Contributor

Ah sorry, thinking of unrelated fuckup of dirOf #14515

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

Labels

with-tests Issues related to testing. PRs with tests have some priority

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants