tarball '...' contains an unexpected number of top-level files #1177
Labels
No labels
Affects/CppNix
Affects/Nightly
Affects/Only nightly
Affects/Stable
Area/build-packaging
Area/cli
Area/evaluator
Area/fetching
Area/flakes
Area/language
Area/lix ci
Area/nix-eval-jobs
Area/profiles
Area/protocol
Area/releng
Area/remote-builds
Area/repl
Area/repl/debugger
Area/store
awaiting
author
awaiting
contributors
bug
Context
contributors
Context
drive-by
Context
maintainers
Context
RFD
crash 💥
Cross Compilation
devx
diagnostics
docs
Downstream Dependents
E/easy
E/hard
E/help wanted
E/reproducible
E/requires rearchitecture
Feature/S3
Importance
High
Importance
Low
imported
Language/Bash
Language/C++
Language/NixLang
Language/Python
Language/Rust
Needs Langver
OS/Linux
OS/macOS
performance
regression
Release Blocking
Non-urgent
Release Blocking
Urgent
stability
Status
blocked
Status
invalid
Status
postponed
Status
wontfix
testing
testing/flakey
Topic/Large Scale Installations
Urgency
High
Urgency
Low
ux
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lix-project/lix#1177
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Describe the bug
I've recently had this problem using tarballs from https://tangled.org/ as flake inputs:
Which appears to be a regression from nix.
Steps To Reproduce
Expected behavior
Nixcpp does not have any issue using the tarball:
nix --versionoutputThis is behavior we inherited from CppNix 2.18 (the version of CppNix we largely forked from). I think there was a discussion about this some time ago but I cannot find or remember it… cc @pennae, @jade.
See also: #582.
can't find or remember it either :/ technically there's no reason we couldn't do the same thing as cppnix and extract a tarball that doesn't contain a single toplevel directory as though it did and all the contents of the tarball were in that directory, but then we run into problems with eg tangled.org repos that contain a single toplevel directory in which everything happens. that directory would be unpacked same as it would now, but other tangled repos would not get this treatment. this would be very confusing and we are thus opposed to doing any such thing.
we're in a fucked up situation here. we either copy broken cppnix behavior, do something like https://gerrit.lix.systems/c/lix/+/1672 and thus change the lock format in incompatible ways, or we add a new tarball fetcher url schema that comes without the strip-root semantics (combining all the bad things of the previous solutions with none of the good things). considering that unpacking tarballs in the format tangled produces is generally fucked up we'd strongly suggest to file a bug with tangled instead
This is just tangled-specific information if anyone else is having this issue with tanlged:
I did some poking around in their source code, and the archive URL supports a
prefixparam, which wraps the contents in a single directory. It sounded like this would solve the problem, however, lix has another little quirk:Not sure what that means. Anyway, this is largely avoidable if you just use git flakerefs in the form
git+https://tangled.org/...