Commit graph

15757 commits

Author SHA1 Message Date
Qyriad 6c3aea2922 add libcmd test for lookupFileArg
Change-Id: I9e2ef170ffe916f902daec8b5630d29434c5d5f2
2024-05-21 12:33:01 -06:00
Qyriad 0e1e135194 oops we fucked up the repl thing 2024-05-21 12:23:43 -06:00
Qyriad 13bf168d0e docs: document lookupFileArg syntax in nix-build
Change-Id: Ib6d68594a16132805ba5d97526e16f7b3633117e
2024-05-21 12:23:34 -06:00
Qyriad e7b0867605 docs: linkify nix3-build mention in nix-build.md
Change-Id: I462a8cf0da42b5045ce84b48dc1841ecdccbb89e
2024-05-21 12:23:34 -06:00
Qyriad e491f8029a build: make internal-api-docs PHONEY
Change-Id: I3b0bcea30ee9a4830023ccc5bededf995e96cccc
2024-05-21 12:23:34 -06:00
Qyriad 3f9e7107d1 repl: log errors writing to history file
These errors are now logged and explicitly ignored, rather than
implicitly ignored.

Change-Id: Ia26015466a17f2b11952df5317a4d150d79dc184
2024-05-21 12:23:33 -06:00
Qyriad 65317900fc cleanup lookupFileArg
Change-Id: I2acd56e7a542b12138f43c95af78fdd50e944619
2024-05-21 12:23:33 -06:00
Qyriad b67a38a55e add docstring to lookupFileArg
Change-Id: Ifc149764f5a15725d3d630677c6da29def4b0f3e
2024-05-21 12:23:33 -06:00
Qyriad 40fb07c312 add libcmd test for lookupFileArg
Change-Id: I9e2ef170ffe916f902daec8b5630d29434c5d5f2
2024-05-21 12:23:33 -06:00
Qyriad 2c72f0fb79 split lookupFileArg tests and docstring 2024-05-21 12:12:42 -06:00
Qyriad e508958c25 docs: document lookupFileArg syntax in nix-build
Change-Id: Ib6d68594a16132805ba5d97526e16f7b3633117e
2024-05-21 12:12:08 -06:00
Qyriad 309aeed2c1 docs: linkify nix3-build mention in nix-build.md
Change-Id: I462a8cf0da42b5045ce84b48dc1841ecdccbb89e
2024-05-21 12:12:08 -06:00
Qyriad ea93407c32 build: make internal-api-docs PHONEY
Change-Id: I3b0bcea30ee9a4830023ccc5bededf995e96cccc
2024-05-21 12:12:08 -06:00
Qyriad 81e413bc87 cleanup lookupFileArg
Change-Id: I2acd56e7a542b12138f43c95af78fdd50e944619
2024-05-21 12:12:08 -06:00
Qyriad eccb06265b add docstring to lookupFileArg
Change-Id: Ifc149764f5a15725d3d630677c6da29def4b0f3e
2024-05-21 12:12:08 -06:00
Qyriad 59a09bd023 add libcmd test for lookupFileArg
Change-Id: I9e2ef170ffe916f902daec8b5630d29434c5d5f2
2024-05-21 12:12:08 -06:00
Qyriad 8007e86415 drop TestingStore to its own series 2024-05-21 11:54:00 -06:00
Qyriad c304d3e839 docs: document lookupFileArg syntax in nix-build
Change-Id: Ib6d68594a16132805ba5d97526e16f7b3633117e
2024-05-21 11:53:41 -06:00
Qyriad cb8c52907b docs: linkify nix3-build mention in nix-build.md
Change-Id: I462a8cf0da42b5045ce84b48dc1841ecdccbb89e
2024-05-21 11:53:41 -06:00
Qyriad 19c2e62cf1 build: make internal-api-docs PHONEY
Change-Id: I3b0bcea30ee9a4830023ccc5bededf995e96cccc
2024-05-21 11:53:41 -06:00
Qyriad 976d4fe274 rebase, dropping 73ef8cd50a since it's merged 2024-05-21 11:50:52 -06:00
Qyriad 6219596ab1 repl: log errors writing to history file
These errors are now logged and explicitly ignored, rather than
implicitly ignored.

The simple logic is duplicated in ReadlineLikeInteractor's getLine() and
destructor, rather than refactoring history writing into a separate
function. This is a tiny amount of logic and these two locations are
right next to each other.

Change-Id: Ia26015466a17f2b11952df5317a4d150d79dc184
2024-05-21 11:50:10 -06:00
Qyriad 1f071faab1 cleanup lookupFileArg
Change-Id: I2acd56e7a542b12138f43c95af78fdd50e944619
2024-05-21 11:50:10 -06:00
Qyriad f936eabbc3 docs: document lookupFileArg syntax in nix-build
Change-Id: Ib6d68594a16132805ba5d97526e16f7b3633117e
2024-05-21 11:50:10 -06:00
Qyriad 25f390963c add docstring to lookupFileArg
Change-Id: Ifc149764f5a15725d3d630677c6da29def4b0f3e
2024-05-21 11:50:10 -06:00
Qyriad 380cf45cb6 docs: linkify nix3-build mention in nix-build.md
Change-Id: I462a8cf0da42b5045ce84b48dc1841ecdccbb89e
2024-05-21 11:50:10 -06:00
Qyriad 46cb407f21 build: make internal-api-docs PHONEY
Change-Id: I3b0bcea30ee9a4830023ccc5bededf995e96cccc
2024-05-21 11:50:10 -06:00
Qyriad f4ce7194a9 WIP: add TestingStore store implementation
Change-Id: I1e57895030665fb63d1c47cb4fc2b959b5761618
2024-05-21 11:50:10 -06:00
Qyriad 6881476232 libfetchers: fallback to memory SQLite if fs IO fails
nix::fetchers::CacheImpl uses $XDG_CACHE_HOME, or its default based on
$HOME, to store its SQLite database. If the current process can't write
to that directory for whatever reason, though, any eval-time fetching
would fail just initializing the cache.

With this change, IO errors initializing the fetcher cache are logged
but ignored, and nix::fetchers::CacheImpl falls back to an in-memory¹
database instead.

Notably, this will fix any uses eval fetching while Lix itself is being
run in a derivation builder (such as during tests), as the derivation
builder does not set $XDG_CACHE_HOME, and sets $HOME to the non-existent
directory /homeless-shelter.

Before:

$ env -u XDG_CACHE_HOME HOME=/homeless-shelter nix -Lv eval --impure -E 'fetchTarball "https://git.lix.systems/lix-project/lix/archive/main.tar.gz"'
error:
       … while calling the 'fetchTarball' builtin
         at «string»:1:1:
            1| fetchTarball "https://git.lix.systems/lix-project/lix/archive/main.tar.gz"
             | ^

       error: creating directory '/homeless-shelter': Permission denied

After:

$ env -u XDG_CACHE_HOME HOME=/homeless-shelter nix -Lv eval --impure -E 'fetchTarball "https://git.lix.systems/lix-project/lix/archive/main.tar.gz"'
warning: ignoring error initializing Lix fetcher cache: error: creating directory '/homeless-shelter': Permission denied
"/nix/store/s9lxdnn0awp37n560bg4fgr497ah4hvw-source"

¹: https://www.sqlite.org/inmemorydb.html

Change-Id: I15c38c9baaf215fc6e192b8a4c70b9692a69bc22
2024-05-21 09:30:25 -06:00
alois31 d5fdb995d3
doc: fix repl-interrupt release note entry
The timing of the merge resulted in the newly introduced metadata not being
present.

Change-Id: I07f28cf37703ec05c3e1b96301797a42d913264b
2024-05-21 16:34:04 +02:00
Qyriad 20981461d4 print type and value in "flake attr is not a derivation" errors
This turns errors like:

error: flake output attribute 'hydraJobs' is not a derivation or path

into errors like:

error: expected flake output attribute 'hydraJobs' to be a derivation or
path but found a set: { binaryTarball = «thunk»; build = «thunk»; etc> }

This change affects all InstallableFlake commands.

Change-Id: I899757af418b6f98201006ec6ee13a448c07077c
2024-05-21 05:55:13 -06:00
Qyriad 7badae0a6d okay probably finalize the docs thing 2024-05-21 05:22:36 -06:00
Qyriad 6a172a5535 docs: document lookupFileArg syntax in nix-build
Change-Id: Ib6d68594a16132805ba5d97526e16f7b3633117e
2024-05-20 22:31:17 -06:00
Qyriad 62da6e55b2 the main event 2024-05-20 22:21:45 -06:00
Qyriad 54a5cd6f5b docs: document lookupFileArg syntax in nix-build
Change-Id: Ib6d68594a16132805ba5d97526e16f7b3633117e
2024-05-20 22:21:14 -06:00
Qyriad 8e210908a9 docs: linkify nix3-build mention in nix-build.md
Change-Id: I462a8cf0da42b5045ce84b48dc1841ecdccbb89e
2024-05-20 21:58:27 -06:00
Qyriad 5364aaf47f almost there 2024-05-20 20:54:32 -06:00
Qyriad 2a6f03a7b0 build: make internal-api-docs PHONEY
Change-Id: I3b0bcea30ee9a4830023ccc5bededf995e96cccc
2024-05-20 20:54:22 -06:00
Qyriad 53c6f7eb35 WIP: add TestingStore store implementation
Change-Id: I1e57895030665fb63d1c47cb4fc2b959b5761618
2024-05-20 20:54:22 -06:00
Qyriad 1f86d81834 cleanup lookupFileArg
Change-Id: I2acd56e7a542b12138f43c95af78fdd50e944619
2024-05-20 20:54:22 -06:00
Qyriad d4491263cb add docstring to lookupFileArg
Change-Id: Ifc149764f5a15725d3d630677c6da29def4b0f3e
2024-05-20 20:54:22 -06:00
Qyriad 38013857d5 more lookupFileArg 2024-05-20 20:51:30 -06:00
Qyriad 32940ecf5e WIP: add TestingStore store implementation
Change-Id: I1e57895030665fb63d1c47cb4fc2b959b5761618
2024-05-20 20:51:13 -06:00
Qyriad 8d50fc6eb9 cleanup lookupFileArg
Change-Id: I2acd56e7a542b12138f43c95af78fdd50e944619
2024-05-20 20:51:13 -06:00
Qyriad f4103efdef add docstring to lookupFileArg
Change-Id: Ifc149764f5a15725d3d630677c6da29def4b0f3e
2024-05-20 20:51:13 -06:00
Qyriad db9f347b75 lookupFileArg 2024-05-20 13:51:49 -06:00
Qyriad 8849d072dd cleanup lookupFileArg
Change-Id: I2acd56e7a542b12138f43c95af78fdd50e944619
2024-05-20 13:51:42 -06:00
Qyriad da43283e88 add docstring to lookupFileArg
Change-Id: Ifc149764f5a15725d3d630677c6da29def4b0f3e
2024-05-20 13:16:09 -06:00
Artemis Tosini 3de77e6dbd Merge "libutil: Create chmodPath function" into main 2024-05-20 15:13:53 +00:00
raito 8e1a883186 Merge "chore: remove incorrect maintainers/*.md documentation" into main 2024-05-20 12:35:20 +00:00