lix/tests/functional/flakes
Maximilian Bosch 87fd1f024c Reapply "libfetchers: make attribute / URL query handling consistent"
The original attempt at this introduced a regression; this commit
reverts the revert and fixes the regression.

This reverts commit 3e151d4d77.

Fix to the regression:

flakeref: fix handling of `?dir=` param for flakes in subdirs

As reported in #419[1], accessing a flake in a subdir of a Git
repository fails with the previous commit[2] applied with the error

    error: unsupported Git input attribute 'dir'

The problem is that the `dir`-param is inserted into the parsed URL if a
flake is fetched from the subdir of a Git repository. However, for the
fetching part this isn't even needed. The fix is to just pass `subdir`
as second argument to `FlakeRef` (which needs a `basedir` that can be
empty) and leave the parsedURL as-is.

Added a regression test to make sure we don't run into this again.

[1] lix-project/lix#419
[2] e22172aaf6b6a366cecd3c025590e68fa2b91bcc,
    originally 3e151d4d77

Change-Id: I2c72d5a32e406a7ca308e271730bd0af01c5d18b
2024-08-01 15:41:30 -07:00
..
absolute-paths.sh Put functional tests in tests/functional 2023-12-01 12:06:43 -05:00
build-paths.sh Put functional tests in tests/functional 2023-12-01 12:06:43 -05:00
bundle.sh Put functional tests in tests/functional 2023-12-01 12:06:43 -05:00
check.sh Put functional tests in tests/functional 2023-12-01 12:06:43 -05:00
circular.sh Add pre-commit checks 2024-03-29 22:57:40 -07:00
common.sh Put functional tests in tests/functional 2023-12-01 12:06:43 -05:00
config.sh libexpr/flake: allow automatic rejection of configuration options from flakes 2024-06-30 19:28:14 +02:00
develop-r8854.sh Merge pull request #9324 from 9999years/fix-8854-take-2 2024-03-07 14:50:43 +01:00
develop.sh Merge pull request #8043 from bobvanderlinden/pr-shell-env 2024-03-04 07:59:32 +01:00
flake-in-submodule.sh Put functional tests in tests/functional 2023-12-01 12:06:43 -05:00
flake-registry.sh tests/flake-registry: Fix occasional deadlocks 2024-06-12 15:34:23 -07:00
flakes.sh Reject fully-qualified URLs in 'from' argument of nix registry add 2024-06-29 05:11:31 +00:00
follow-paths.sh tests/flakes/follow-paths: test that warning about non-existent input works recursively 2024-05-03 22:54:38 +00:00
init.sh Put functional tests in tests/functional 2023-12-01 12:06:43 -05:00
inputs.sh Put functional tests in tests/functional 2023-12-01 12:06:43 -05:00
mercurial.sh tests: actually run mercurial tests 2024-05-04 16:48:07 +02:00
run.sh Add pre-commit checks 2024-03-29 22:57:40 -07:00
search-root.sh Put functional tests in tests/functional 2023-12-01 12:06:43 -05:00
show.sh Put functional tests in tests/functional 2023-12-01 12:06:43 -05:00
subdir-flake.sh Reapply "libfetchers: make attribute / URL query handling consistent" 2024-08-01 15:41:30 -07:00
unlocked-override.sh Put functional tests in tests/functional 2023-12-01 12:06:43 -05:00