Commit graph

13559 commits

Author SHA1 Message Date
Théophane Hufschmitt d70b890488
Merge pull request #7689 from ncfavier/nix-path-restrict-eval
getDefaultNixPath: actually respect `{restrict,pure}-eval`
2023-01-30 10:03:17 +01:00
John Ericson ecd3e4ebd7 More property tests
Also put proper comparison methods on `DerivedPath` and
`NixStringContextElem`, which is needed for the tests but good in
general.
2023-01-29 17:09:59 -05:00
John Ericson ec0c0efec6 Allow unit test infra to be reused across libs' tests
This allows using Arbitrary "instances" defined in libstore-tests in
libexpr-tests, something we will leverage in a moment.
2023-01-29 13:52:57 -05:00
John Ericson 6772e9ed0a Allow programs to have custom names
Logic modeled after that for libraries.
2023-01-29 13:52:57 -05:00
Max 02e81cdf62 apply showAllSystems to legacyPackages as well 2023-01-27 23:59:48 +01:00
Naïm Favier dba9173a1d
Document default nix-path value 2023-01-27 15:25:07 +01:00
Théophane Hufschmitt ccaadc9575
Merge pull request #7648 from hercules-ci/move-nixos-tests
Move nixos tests
2023-01-27 15:11:48 +01:00
Naïm Favier 1cba5984a6
getDefaultNixPath: actually respect {restrict,pure}-eval
Previously, getDefaultNixPath was called too early: at initialisation
time, before CLI and config have been processed, when `restrictEval` and
`pureEval` both have their default value `false`. Call it when
initialising the EvalState instead, and use `setDefault`.
2023-01-27 13:28:57 +01:00
Théophane Hufschmitt 79c084cb59 Add a test for nix flake show 2023-01-27 10:15:49 +01:00
Théophane Hufschmitt ab424a39a9 Merge remote-tracking branch 'nixos/master' into pr-flake-show-foreign 2023-01-27 09:46:46 +01:00
Théophane Hufschmitt ed479aafdc
Merge pull request #7461 from rapenne-s/improve_messaging_untrusted_sub_user
Improve warning when an untrusted user is using an untrusted substituter
2023-01-26 11:01:37 +01:00
Solène Rapenne 6b2729c81e improve documentation about substituters and trusted users
Co-authored-by: Théophane Hufschmitt <theophane.hufschmitt@tweag.io>
2023-01-26 09:56:44 +01:00
Solène Rapenne 64951d9125 Update src/libstore/daemon.cc
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2023-01-26 09:34:25 +01:00
Solène Rapenne a96156c58f warnings: enhance the case of untrusted substituter for untrusted user 2023-01-26 09:34:25 +01:00
Eelco Dolstra aa61ae03da
Merge pull request #7685 from obsidiansystems/fix-change-log
Fix the 2.13 changelog
2023-01-25 21:08:40 +01:00
Eelco Dolstra 33263ee20f
Merge pull request #7686 from obsidiansystems/fix-coverage
Fix the coverage job
2023-01-25 21:06:51 +01:00
John Ericson f465e378c4
Update doc/manual/src/release-notes/rl-2.13.md
Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
2023-01-25 08:58:41 -05:00
John Ericson 75892710f8 Fix the coverage job
See https://hydra.nixos.org/build/206790960
2023-01-24 19:19:19 -05:00
John Ericson 816031173c Fix the 2.13 changelog
It is just the new CLI that gets the `^` syntax. The old CLI already has
a (slightly different) `!` syntax.

Fixes #7682
2023-01-24 18:53:46 -05:00
Théophane Hufschmitt 189261c344
Merge pull request #7681 from layus/virtual-destructor-warning
Fix 'destructor called on non-final ...' warning
2023-01-24 21:57:24 +01:00
Guillaume Maudoux 734c5fdcd6 Fix 'destructor called on non-final ...' warning
clangStdenv compiles with a single warning:

```
warning: destructor called on non-final 'nix::PosAdapter' that has virtual functions but non-virtual destructor [-Wdelete-non-abstract-non-virtual-dtor]
```

This fixes the warning by making the destructor of PosAdapter virtual,
deffering to the correct destructor from the concrete child classes.
This has no impact in the end, as none of these classes have specific
destructors.

Technicaly, it may be faster not to have this indirection, but as per
the warning, there is only one place where we have to delete abstract
PosAdapter values.

Not worth bikesheding I guess.
2023-01-24 16:37:50 +01:00
Robert Hensing f233fd496d
Merge pull request #7679 from hercules-ci/re-add-boehmgc-patch
Revert "fixup: remove boehmgc patch"
2023-01-24 16:26:47 +01:00
Robert Hensing 46054f932b Update boehmgc-coroutine-sp-fallback.diff 2023-01-24 15:11:55 +01:00
Robert Hensing 8270dccf60 Actually complete the revert 2023-01-24 14:57:18 +01:00
Robert Hensing 0664ba0a67 Revert "fixup: remove boehmgc patch"
It is still necessary.
Please do your research, or f ask the author, which happens to be me.

An evaluator like this is not an environment where "it compiles, so
it works" will ever hold.

This reverts commit 1c40182b12.
2023-01-24 14:39:45 +01:00
Eelco Dolstra d83479d18a
Merge pull request #7673 from iFreilicht/fix-glossary
doc: fix anchor links in and to glossary
2023-01-24 13:09:37 +01:00
Robert Hensing 3e1a4b18b6
Merge pull request #7670 from obsidiansystems/try-fix-7669
Try to fix #7669
2023-01-24 12:44:02 +01:00
Eelco Dolstra 8dac9a44b3
Merge pull request #7671 from NixOS/dependabot/github_actions/zeebe-io/backport-action-1.1.0
Bump zeebe-io/backport-action from 1.0.1 to 1.1.0
2023-01-24 12:29:15 +01:00
Robert Hensing 04cc7f90f3
Merge pull request #7675 from obsidiansystems/tighten-export-refs-test
Tighten up the `exportReferencesGraph` tests
2023-01-24 11:35:16 +01:00
Andrea Ciceri f58759816d Tighten up the exportReferencesGraph tests
Add an `$` at the end of the `grep` regex. Without it, `checkRef foo`
would always imply `checkRef foo.drv`. We want to tell these situations
apart to more precisely test what is going on.
2023-01-23 20:41:32 -05:00
Felix Uhl dc4aa383e9 doc: fix anchor links in and to glossary 2023-01-24 00:19:43 +01:00
dependabot[bot] 57f9dcaeb2
Bump zeebe-io/backport-action from 1.0.1 to 1.1.0
Bumps [zeebe-io/backport-action](https://github.com/zeebe-io/backport-action) from 1.0.1 to 1.1.0.
- [Release notes](https://github.com/zeebe-io/backport-action/releases)
- [Commits](https://github.com/zeebe-io/backport-action/compare/v1.0.1...v1.1.0)

---
updated-dependencies:
- dependency-name: zeebe-io/backport-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-23 22:00:50 +00:00
John Ericson a91709a604 Try to fix #7669
The issue *seems* to be the cross jobs, which are missing the `CXXFLAGS`
needed to get rapidcheck.

PR #6538 would be really nice to resurrect which will prevent the
`configureFlags` from going out of sync between the regular build and
the cross build again.
2023-01-23 15:47:26 -05:00
Eelco Dolstra f503ba1b8b
Merge pull request #7595 from cole-h/show-setting-value
nix/show-config: allow getting the value of a specific setting
2023-01-23 17:56:39 +01:00
Robert Hensing 9b56683398
Merge pull request #7447 from aakropotkin/read-file-type
Read file type
2023-01-23 17:37:22 +01:00
Robert Hensing 0a9acefeb5
Merge pull request #7657 from obsidiansystems/fix-7655
Fix #7655
2023-01-23 15:42:59 +01:00
Robert Hensing a58e9c3860
Merge pull request #7639 from obsidiansystems/output-names
Test store paths, with property tests, fix bug
2023-01-23 15:21:23 +01:00
John Ericson 018e2571aa Test store paths, with property tests
The property test in fact found a bug: we were excluding numbers!
2023-01-23 07:05:50 -05:00
John Ericson 685395332d Better-scope Store forward declarations 2023-01-23 07:05:50 -05:00
John Ericson 7fe308c2f8 Add rapidcheck dependency for testing
Property tests are great!

Co-authored-by: Cole Helbling <cole.e.helbling@outlook.com>
2023-01-23 07:05:50 -05:00
Robert Hensing 37c533ed27
rl-next.md: Minor improvement 2023-01-23 11:28:31 +01:00
Théophane Hufschmitt 90e630a542
Merge pull request #7641 from layus/coerce-strings-fixups
Coerce strings fixups
2023-01-23 09:39:00 +01:00
Alex Ameen 153ee460c5 primop: add readFileType, optimize readDir
Allows checking directory entry type of a single file/directory.

This was added to optimize the use of `builtins.readDir` on some
filesystems and operating systems which cannot detect this information
using POSIX's `readdir`.

Previously `builtins.readDir` would eagerly use system calls to lookup
these filetypes using other interfaces; this change makes these
operations lazy in the attribute values for each file with application
of `builtins.readFileType`.
2023-01-22 13:45:02 -06:00
John Ericson 0afdf4084c Fix #7655
We had some local variables left over from the older (more
complicated) implementation of this function. They should all be unused,
but one wasn't by mistake.

Delete them all, and replace the one that was still in use as intended.
2023-01-21 23:55:06 -05:00
John Ericson 88d8f6ac48 Expand tests to reproduce #7655
The original `builtins.getContext` test from
1d757292d0 would have caught this. The
problem is that b30be6b450 adding
`builtins.appendContext` modified that test to make it test too much at
once, rather than adding a separate test.

We now have isolated tests for both functions, and also a property test
showing everything put together (in the form of an eta rule for strings
with context). This is better coverage and properly reproduces the bug.
2023-01-21 23:50:09 -05:00
Robert Hensing 3c08a3e6b6 PR template: Specify path to integration tests 2023-01-20 16:23:52 +01:00
Robert Hensing 261c25601d Use the official, documented NixOS runTest interface 2023-01-20 16:23:52 +01:00
Robert Hensing 74026bb101 tests: Move NixOS tests to tests/nixos
This will allow contributors to find them more easily.
2023-01-20 15:33:13 +01:00
Robert Hensing 04de0dd0b4
Merge pull request #7577 from hercules-ci/pr-template
.github: Add pull request template
2023-01-20 14:36:09 +01:00
Robert Hensing dfbdde6d07
Update .github/PULL_REQUEST_TEMPLATE.md 2023-01-20 14:06:46 +01:00