243c0f18d[1] allowed the logger's progress bar to display during repl
builds, but startProgressBar() re-creates the entire logger from
scratch, discarding the value of printBuildLogs (and leaking the
previous logger). In this commit, we instead make the update thread
stopping solely conditional on quitCV, unset active, and manually
reset activities and stored values in the progress bar's state, so stuff
from multiple builds don't leak over into following ones.
[1]: 243c0f18da
Change-Id: Ie734d1f638d45759d232805d7e3c2005f7dea483
243c0f18d[1] allowed the logger's progress bar to display during repl
builds, but startProgressBar() re-creates the entire logger from
scratch, discarding the value of printBuildLogs (and leaking the
previous logger). In this commit, we instead make the update thread
stopping solely conditional on quitCV, unset active, and manually
reset activities and stored values in the progress bar's state, so stuff
from multiple builds don't leak over into following ones.
[1]: 243c0f18da
Change-Id: Ie734d1f638d45759d232805d7e3c2005f7dea483
243c0f18d[1] allowed the logger's progress bar to display during repl
builds, but startProgressBar() re-creates the entire logger from
scratch, discarding the value of printBuildLogs (and leaking the
previous logger). In this commit, we instead make the update thread
stopping solely conditional on quitCV, unset active, and manually
reset activities and stored values in the progress bar's state, so stuff
from multiple builds don't leak over into following ones.
[1]: 243c0f18da
Change-Id: Ie734d1f638d45759d232805d7e3c2005f7dea483
243c0f18d[1] allowed the logger's progress bar to display during repl
builds, but startProgressBar() re-creates the entire logger from
scratch, discarding the value of printBuildLogs (and leaking the
previous logger). In this commit, we instead make the update thread
stopping solely conditional on quitCV, unset active, and manually
reset activities and stored values in the progress bar's state, so stuff
from multiple builds don't leak over into following ones.
[1]: 243c0f18da
Change-Id: Ie734d1f638d45759d232805d7e3c2005f7dea483
243c0f18d[1] allowed the logger's progress bar to display during repl
builds, but startProgressBar() re-creates the entire logger from
scratch, discarding the value of printBuildLogs (and leaking the
previous logger). In this commit, we instead call logger->pause() and
logger->resume(), and in logger->pause(), we manually reset the
activities and stored values in the progress bar's state, so stuff from
multiple builds don't leak over into following ones.
[1]: 243c0f18da
Change-Id: Ie734d1f638d45759d232805d7e3c2005f7dea483
243c0f18d[1] allowed the logger's progress bar to display during repl
builds, but startProgressBar() re-creates the entire logger from
scratch, discarding the value of printBuildLogs (and leaking the
previous logger). In this commit, we instead call logger->pause() and
logger->resume().
[1]: 243c0f18da
Change-Id: Ie734d1f638d45759d232805d7e3c2005f7dea483
The progress bar normally maintains the invariant that the update thread is
only running when the progress bar is active. This was violated when it is
already created in inactive state, which happens when stderr is not a TTY. The
update thread is superfluous and would cause std::terminate if the logger were
to be destroyed.
Change-Id: I6ed3e26cdba00e5ac316078fea272d3a1aa0d112
This is a squash of upstream PRs #10303, #10312 and #10883.
fix: Treat empty TMPDIR as unset
Fixes an instance of
nix: src/libutil/util.cc:139: nix::Path nix::canonPath(PathView, bool): Assertion `path != ""' failed.
... which I've been getting in one of my shells for some reason.
I have yet to find out why TMPDIR was empty, but it's no reason for
Nix to break.
(cherry picked from commit c3fb2aa1f9d1fa756dac38d3588c836c5a5395dc)
fix: Treat empty XDG_RUNTIME_DIR as unset
See preceding commit. Not observed in the wild, but is sensible
and consistent with TMPDIR behavior.
(cherry picked from commit b9e7f5aa2df3f0e223f5c44b8089cbf9b81be691)
local-derivation-goal.cc: Reuse defaultTempDir()
(cherry picked from commit fd31945742710984de22805ee8d97fbd83c3f8eb)
fix: remove usage of XDG_RUNTIME_DIR for TMP
(cherry picked from commit 1363f51bcb24ab9948b7b5093490a009947f7453)
tests/functional: Add count()
(cherry picked from commit 6221770c9de4d28137206bdcd1a67eea12e1e499)
Remove uncalled for message
(cherry picked from commit b1fe388d33530f0157dcf9f461348b61eda13228)
Add build-dir setting
(cherry picked from commit 8b16cced18925aa612049d08d5e78eccbf0530e4)
Change-Id: Ic7b75ff0b6a3b19e50a4ac8ff2d70f15c683c16a
The stdenv phases don’t actually do anything (at least not anymore),
and our justfile doesn’t behave the same as our docs.
This patch removes the stdenv phases from the docs, documents our
usage of just, and makes `just setup` heed `$mesonFlags`.
Fixes#413.
Fixes#414.
Change-Id: Ieb0b2a8ae420526238b5f9a73d7849ec6919995d
Following the latest hacking.md currently fails because of a missing
include in upstream editline. This patch fixes the build by adding
that missing include.
Fixes#410.
Change-Id: Iefd4cb687ed3da71ccda9fe9624f38e6ef4623e5
this was only used in one place, and that place has been rewritten to
use a temporary file instead. keeping this around is not very helpful
at this time, and in any case we'd be better off rewriting subprocess
handling in rust where we not only have a much safer library for such
things but also async frameworks necessary for this easily available.
Change-Id: I6f8641b756857c84ae2602cdf41f74ee7a1fda02
we want to remove runProgram's ability to provide stdin to a process
because the concurrency issues of handling both stdin and stdout are
much more pronounced once runProgram returns not is collected output
but a source. this is possible in the current c++ framework, however
it isn't necessary in almost all cases (as demonstrated by only this
single user existing) and in much better handled with a proper async
concurrency model that lets the caller handle both at the same time.
Change-Id: I29da1e1ad898d45e2e33a7320b246d5003e7712b
This is primarily for readability, but iwrc chaining std::string's
operator+ is also pretty scuffed performance-wise, and this was doing a
lot of operator+ chainging.
Change-Id: I9f25235df153eb2bbb491f1ff7ebbeed9a8ec985
copy-constructing or assigning from pid_t can easily lead to duplicate
Pid instances for the same process if a pid_t was used carelessly, and
Pid itself was copy-constructible. both could cause surprising results
such as killing processes twice (which could become very problemantic,
but luckily modern systems don't reuse PIDs all that quickly), or more
than one piece of the code believing it owns a process when neither do
Change-Id: Ifea7445f84200b34c1a1d0acc2cdffe0f01e20c6
this is only used in one place, and only to set a nicer error message on
EndOfFile. the only caller that actually *catches* this exception should
provide an error message in that catch block rather than forcing support
for setting error message so deep into the stack. copyStorePath is never
called outside of PathSubstitutionGoal anyway, which catches everything.
Change-Id: Ifbae8706d781c388737706faf4c8a8b7917ca278
LocalDerivationGoal includes a large number of low-level sandboxing
primitives for Darwin and Linux, intermingled with ifdefs.
Start creating platform-specific classes to make it easier to add new
platforms and review platform-specific code.
This change only creates support infrastructure and moves two function,
more functions will be moved in future changes.
Change-Id: I9fc29fa2a7345107d4fc96c46fa90b4eabf6bb89
This comes quite often when the available job slots on all remote
builders are exhausted and this is pretty spammy.
This isn't really an issue, but expected behavior.
A better way to display this is a nom-like approach where all scheduled
builds are shown in a tree and pending builds are being marked as such
IMHO.
Change-Id: I6bc14e6054f84e3eb0768127b490e263d8cdcf89
The original idea was to fix lix#174, but for a user friendly solution,
I figured that we'd need more consistency:
* Invalid query params will cause an error, just like invalid
attributes. This has the following two consequences:
* The `?dir=`-param from flakes will be removed before the URL to be
fetched is passed to libfetchers.
* The tarball fetcher doesn't allow URLs with custom query params
anymore. I think this was questionable anyways given that an
arbitrary set of query params was silently removed from the URL you
wanted to fetch. The correct way is to use an attribute-set
with a key `url` that contains the tarball URL to fetch.
* Same for the git & mercurial fetchers: in that case it doesn't even
matter though: both fetchers added unused query params to the URL
that's passed from the input scheme to the fetcher (`url2` in the code).
It turns out that this was never used since the query parameters were
erased again in `getActualUrl`.
* Validation happens for both attributes and URLs. Previously, a lot of
fetchers validated e.g. refs/revs only when specified in a URL and
the validity of attribute names only in `inputFromAttrs`.
Now, all the validation is done in `inputFromAttrs` and `inputFromURL`
constructs attributes that will be passed to `inputFromAttrs`.
* Accept all attributes as URL query parameters. That also includes
lesser used ones such as `narHash`.
And "output" attributes like `lastModified`: these could be declared
already when declaring inputs as attribute rather than URL. Now the
behavior is at least consistent.
Personally, I think we should differentiate in the future between
"fetched input" (basically the attr-set that ends up in the lock-file)
and "unfetched input" earlier: both inputFrom{Attrs,URL} entrypoints
are probably OK for unfetched inputs, but for locked/fetched inputs
a custom entrypoint should be used. Then, the current entrypoints
wouldn't have to allow these attributes anymore.
Change-Id: I1be1992249f7af8287cfc37891ab505ddaa2e8cd
Add the log-formats `multiline` and `multiline-with-logs` which offer
multiple current active building status lines.
Change-Id: Idd8afe62f8591b5d8b70e258c5cefa09be4cab03