* Re: “Guix Profiles in Practice”
2019-10-25 16:36 ` Thompson, David
@ 2019-10-25 20:44 ` Pjotr Prins
2019-10-26 10:02 ` Pierre Neidhardt
2019-10-30 8:36 ` Pierre Neidhardt
2019-10-26 0:34 ` Jonathan Frederickson
` (2 subsequent siblings)
3 siblings, 2 replies; 31+ messages in thread
From: Pjotr Prins @ 2019-10-25 20:44 UTC (permalink / raw)
To: Thompson, David; +Cc: guix-devel, help-guix
On Fri, Oct 25, 2019 at 12:36:01PM -0400, Thompson, David wrote:
> On Fri, Oct 25, 2019 at 6:57 AM Ludovic Courtès <ludo@gnu.org> wrote:
> >
> > Hello Guix!
> >
> > Here’s a new blog post by Pierre Neidhardt entitled “Guix Profiles in
> > Practice”:
> >
> > https://guix.gnu.org/blog/2019/guix-profiles-in-practice/
> >
> > A great discussion on the benefits of manifests and on ways to manage
> > several profiles!
>
> Great article!
I agree. One useful thing not mentioned in there is, that before
loading a profile, it may be worthwhile to empty the shell with
env -i /bin/bash --login --noprofile --norc
. ~/opt/my-tools-profile/etc/profile
so no existing shell variables may pollute your beautiful setup.
Pj
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: “Guix Profiles in Practice”
2019-10-25 20:44 ` Pjotr Prins
@ 2019-10-26 10:02 ` Pierre Neidhardt
2019-10-27 8:56 ` Pjotr Prins
2019-10-30 8:36 ` Pierre Neidhardt
1 sibling, 1 reply; 31+ messages in thread
From: Pierre Neidhardt @ 2019-10-26 10:02 UTC (permalink / raw)
To: Pjotr Prins, Thompson, David; +Cc: guix-devel, help-guix
[-- Attachment #1: Type: text/plain, Size: 1275 bytes --]
Pjotr Prins <pjotr.public12@thebird.nl> writes:
> On Fri, Oct 25, 2019 at 12:36:01PM -0400, Thompson, David wrote:
>> On Fri, Oct 25, 2019 at 6:57 AM Ludovic Courtès <ludo@gnu.org> wrote:
>> >
>> > Hello Guix!
>> >
>> > Here’s a new blog post by Pierre Neidhardt entitled “Guix Profiles in
>> > Practice”:
>> >
>> > https://guix.gnu.org/blog/2019/guix-profiles-in-practice/
>> >
>> > A great discussion on the benefits of manifests and on ways to manage
>> > several profiles!
>>
>> Great article!
>
> I agree. One useful thing not mentioned in there is, that before
> loading a profile, it may be worthwhile to empty the shell with
>
> env -i /bin/bash --login --noprofile --norc
>
> . ~/opt/my-tools-profile/etc/profile
>
> so no existing shell variables may pollute your beautiful setup.
Nice tip, Pjotr!
We can add it to the cookbook. Shall I add it to the blog article now
that it's published?
In https://lists.gnu.org/archive/html/guix-devel/2019-10/msg00565.html
we discussed the possibility to remove a specific profile from the
environment, which would be a more general version of what you propose.
It currently has some shortcomings, but maybe we can fix them.
--
Pierre Neidhardt
https://ambrevar.xyz/
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: “Guix Profiles in Practice”
2019-10-26 10:02 ` Pierre Neidhardt
@ 2019-10-27 8:56 ` Pjotr Prins
2019-10-27 11:30 ` Pierre Neidhardt
0 siblings, 1 reply; 31+ messages in thread
From: Pjotr Prins @ 2019-10-27 8:56 UTC (permalink / raw)
To: Pierre Neidhardt; +Cc: guix-devel, help-guix, Pjotr Prins
On Sat, Oct 26, 2019 at 12:02:51PM +0200, Pierre Neidhardt wrote:
> Pjotr Prins <pjotr.public12@thebird.nl> writes:
>
> > On Fri, Oct 25, 2019 at 12:36:01PM -0400, Thompson, David wrote:
> >> On Fri, Oct 25, 2019 at 6:57 AM Ludovic Courtès <ludo@gnu.org> wrote:
> >> >
> >> > Hello Guix!
> >> >
> >> > Here’s a new blog post by Pierre Neidhardt entitled “Guix Profiles in
> >> > Practice”:
> >> >
> >> > https://guix.gnu.org/blog/2019/guix-profiles-in-practice/
> >> >
> >> > A great discussion on the benefits of manifests and on ways to manage
> >> > several profiles!
> >>
> >> Great article!
> >
> > I agree. One useful thing not mentioned in there is, that before
> > loading a profile, it may be worthwhile to empty the shell with
> >
> > env -i /bin/bash --login --noprofile --norc
> >
> > . ~/opt/my-tools-profile/etc/profile
> >
> > so no existing shell variables may pollute your beautiful setup.
>
> Nice tip, Pjotr!
>
> We can add it to the cookbook. Shall I add it to the blog article now
> that it's published?
Why not?
> In https://lists.gnu.org/archive/html/guix-devel/2019-10/msg00565.html
> we discussed the possibility to remove a specific profile from the
> environment, which would be a more general version of what you propose.
> It currently has some shortcomings, but maybe we can fix them.
Sounds great.
Pierre, we have the minimalistic and emerging languages devroom at
FOSDEM this year. I am thinking we could do a talk about using Guix as
a development environment. I mean profiles are great for development -
I use them all the time, including guix environment -C. That could be
a talk.
Another talk could be about programming Guix from the REPL. Guix as a
DSL if you will. Anyone interested in doing a talk about that?
BTW I am also starting to use rash - the racket shell and we have
gash. Anyone want to talk about that? We should invite the authors.
Pj
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: “Guix Profiles in Practice”
2019-10-27 8:56 ` Pjotr Prins
@ 2019-10-27 11:30 ` Pierre Neidhardt
2019-10-27 11:43 ` Hartmut Goebel
2019-10-27 20:06 ` Konrad Hinsen
0 siblings, 2 replies; 31+ messages in thread
From: Pierre Neidhardt @ 2019-10-27 11:30 UTC (permalink / raw)
To: Pjotr Prins; +Cc: guix-devel, help-guix
[-- Attachment #1: Type: text/plain, Size: 1773 bytes --]
Pjotr Prins <pjotr.public12@thebird.nl> writes:
>> We can add it to the cookbook. Shall I add it to the blog article now
>> that it's published?
>
> Why not?
Depends how we look at the "Guix blog": shall we guarantee the content
of the articles to remain the same (beside typos) or shall we update
them as new ideas and other changes pop up?
The latter option has higher maintenance costs, plus we would need a way
to tell the reader when the article was first created, last edited, and
a link to the history of changes.
For the cookbook we've got all that with Git.
> Pierre, we have the minimalistic and emerging languages devroom at
> FOSDEM this year. I am thinking we could do a talk about using Guix as
> a development environment. I mean profiles are great for development -
> I use them all the time, including guix environment -C. That could be
> a talk.
You offering me to give a talk on this? Why not, we can talk about it :)
> Another talk could be about programming Guix from the REPL. Guix as a
> DSL if you will. Anyone interested in doing a talk about that?
I would be very interested if someone could explain how they hack with
Geiser: I'm still frustrated with it on a daily basis :p I'm in
particular interested in debugging. Regarding Guix-specific debugging,
I wonder how Guix developers debug staged code (i.e. when errors happen
for code executed by the daemon).
> BTW I am also starting to use rash - the racket shell and we have
> gash. Anyone want to talk about that? We should invite the authors.
Just watched the video: https://rash-lang.org/
It's amazing!
Now all we need is an Emacs (or https://github.com/soegaard/remacs?) integration...
--
Pierre Neidhardt
https://ambrevar.xyz/
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: “Guix Profiles in Practice”
2019-10-27 11:30 ` Pierre Neidhardt
@ 2019-10-27 11:43 ` Hartmut Goebel
2019-10-27 20:06 ` Konrad Hinsen
1 sibling, 0 replies; 31+ messages in thread
From: Hartmut Goebel @ 2019-10-27 11:43 UTC (permalink / raw)
To: guix-devel
Am 27.10.19 um 12:30 schrieb Pierre Neidhardt:
> Depends how we look at the "Guix blog": shall we guarantee the content
> of the articles to remain the same (
No. This will become a maintenance burden. The article already says
there is an update version in the cookbook. IMHO this is okay.
--
Regards
Hartmut Goebel
| Hartmut Goebel | h.goebel@crazy-compilers.com |
| www.crazy-compilers.com | compilers which you thought are impossible |
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: “Guix Profiles in Practice”
2019-10-27 11:30 ` Pierre Neidhardt
2019-10-27 11:43 ` Hartmut Goebel
@ 2019-10-27 20:06 ` Konrad Hinsen
2019-10-27 21:05 ` Pierre Neidhardt
1 sibling, 1 reply; 31+ messages in thread
From: Konrad Hinsen @ 2019-10-27 20:06 UTC (permalink / raw)
To: guix-devel
On 27/10/2019 12:30, Pierre Neidhardt wrote:
>> Another talk could be about programming Guix from the REPL. Guix as a
>> DSL if you will. Anyone interested in doing a talk about that?
> I would be very interested if someone could explain how they hack with
> Geiser: I'm still frustrated with it on a daily basis :p I'm in
> particular interested in debugging.
I thought I was the only one having difficulties with Geiser and Guix.
Plenty of Geiser features that work fine with small programs seem to
fail with Guix, perhaps because of the sheer size of the codebase.
Jumping to symbol definitions, for example, or access to documentation.
Konrad.
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: “Guix Profiles in Practice”
2019-10-25 20:44 ` Pjotr Prins
2019-10-26 10:02 ` Pierre Neidhardt
@ 2019-10-30 8:36 ` Pierre Neidhardt
1 sibling, 0 replies; 31+ messages in thread
From: Pierre Neidhardt @ 2019-10-30 8:36 UTC (permalink / raw)
To: Pjotr Prins, Thompson, David; +Cc: guix-devel, help-guix
[-- Attachment #1: Type: text/plain, Size: 329 bytes --]
Pjotr, I've added your tip to the cookbook.
> env -i /bin/bash --login --noprofile --norc
>
> . ~/opt/my-tools-profile/etc/profile
Note that I've replaced /bin/bash with $(which bash) since /bin/bash
does not exist on Guix System ;)
Thanks for sharing!
Cheers!
--
Pierre Neidhardt
https://ambrevar.xyz/
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: “Guix Profiles in Practice”
2019-10-25 16:36 ` Thompson, David
2019-10-25 20:44 ` Pjotr Prins
@ 2019-10-26 0:34 ` Jonathan Frederickson
2019-10-26 1:19 ` Jonathan Frederickson
2019-10-26 10:00 ` Pierre Neidhardt
2019-11-03 14:24 ` Ludovic Courtès
3 siblings, 1 reply; 31+ messages in thread
From: Jonathan Frederickson @ 2019-10-26 0:34 UTC (permalink / raw)
To: guix-devel
On 10/25/19 12:36 PM, Thompson, David wrote
> 'guix environment' is a very composable command, and it's not clear to
> me how I would add the stuff I want onto it and it's even less clear
> if it's a good idea. Probably not. So, I wonder if maybe a new
> subcommand, say 'guix develop', could address this common development
> use-case while allowing 'guix environment' to continue being the swiss
> army knife that it is. Some simple naming conventions could make this
> tool "just work." Running 'guix develop' would check for a profile
> symlink with some canonical name, for example '.guix-develop-profile'.
> If it exists, it applies the environment variables and spawns a
> subshell. If it doesn't exist, it looks for a 'develop.scm' file
> (canonical name TBD), builds the profile, symlinks it to
> '.guix-develop-profile', and then does the prior steps. The tool
> would provide a mechanism to update, etc. and it could even be
> expanded later to spawn services like databases.
I love this idea, though I'd like to expand upon that a bit. There's
another tool in the Python world that does something similar called
Pipenv. The gist of it is:
Pipfile: analogous to a Guix manifest
Pipfile.lock: analogous to a Guix manifest + channel spec (this file
contains precisely specified dependency versions)
~/.local/share/virtualenvs/<venv name>: Generated virtualenvs (analogous
to a Guix profile, of course)
You work with these as follows:
$ pipenv install
^ creates a virtualenv with packages from Pipfile.lock (if it exists)
otherwise creates a virtualenv with packages from Pipfile and (by
default) creates Pipfile.lock
$ pipenv lock
^ resolves dependencies for packages in Pipfile and (re)creates Pipfile.lock
$ pipenv shell
^ spawns a subshell in the project's virtualenv
It occurs to me that you could nicely replicate this behavior in Guix by
doing much the same thing; have a convenience command that reads a
manifest with a well-known filename, creates profiles in a well-known
location, and generates a channel spec (probably the current version of
Guix the first time it's run). The end result is that a user could clone
a project with both a manifest and channel spec and end up in the same
environment by just running 'guix develop'.
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: “Guix Profiles in Practice”
2019-10-25 16:36 ` Thompson, David
2019-10-25 20:44 ` Pjotr Prins
2019-10-26 0:34 ` Jonathan Frederickson
@ 2019-10-26 10:00 ` Pierre Neidhardt
2019-10-27 3:29 ` Bengt Richter
2019-10-27 13:33 ` Konrad Hinsen
2019-11-03 14:24 ` Ludovic Courtès
3 siblings, 2 replies; 31+ messages in thread
From: Pierre Neidhardt @ 2019-10-26 10:00 UTC (permalink / raw)
To: Thompson, David, help-guix; +Cc: guix-devel
[-- Attachment #1: Type: text/plain, Size: 2166 bytes --]
"Thompson, David" <dthompson2@worcester.edu> writes:
> Great article!
Thanks! :)
> I spotted a typo in the first paragraph: "on a same system" should be
> "on the same system."
I can fix it. Out of curiosity, why is it wrong? "All users on a
system..." is correct, "All users on a given system" too, so I wonder
why "on a same system" would not be. What I meant here is "the same
unspecified system".
> 'guix environment' is a very composable command, and it's not clear to
> me how I would add the stuff I want onto it and it's even less clear
> if it's a good idea. Probably not. So, I wonder if maybe a new
> subcommand, say 'guix develop', could address this common development
> use-case while allowing 'guix environment' to continue being the swiss
> army knife that it is. Some simple naming conventions could make this
> tool "just work." Running 'guix develop' would check for a profile
> symlink with some canonical name, for example '.guix-develop-profile'.
> If it exists, it applies the environment variables and spawns a
> subshell. If it doesn't exist, it looks for a 'develop.scm' file
> (canonical name TBD), builds the profile, symlinks it to
> '.guix-develop-profile', and then does the prior steps. The tool
> would provide a mechanism to update, etc. and it could even be
> expanded later to spawn services like databases.
Indeed, while I worked on the article I was frustrated with the CLI, so
I wrote this Emacs "hack":
https://gitlab.com/emacs-guix/emacs-guix/issues/13
This is essentially what you propose, but to have it at the CLI level
would provide several benefits:
- More universal.
- Possibly more optimized (e.g. caching).
At the end of the article, I also talk about reproducibility, which is
currently quite cumbersome to deploy because of the need to refer to a
"specific guix channel checkout".
Konrad talked about how we could possibly improve the CLI to deal with
that as well:
https://lists.gnu.org/archive/html/guix-devel/2019-10/msg00511.html
Both issues could be addressed the same way.
Cheers!
--
Pierre Neidhardt
https://ambrevar.xyz/
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: “Guix Profiles in Practice”
2019-10-26 10:00 ` Pierre Neidhardt
@ 2019-10-27 3:29 ` Bengt Richter
2019-10-27 8:49 ` Pierre Neidhardt
2019-10-27 13:33 ` Konrad Hinsen
1 sibling, 1 reply; 31+ messages in thread
From: Bengt Richter @ 2019-10-27 3:29 UTC (permalink / raw)
To: Pierre Neidhardt; +Cc: guix-devel, help-guix
Hi Pierre,
On +2019-10-26 12:00:30 +0200, Pierre Neidhardt wrote:
> "Thompson, David" <dthompson2@worcester.edu> writes:
>
> > Great article!
>
> Thanks! :)
>
> > I spotted a typo in the first paragraph: "on a same system" should be
> > "on the same system."
>
> I can fix it. Out of curiosity, why is it wrong? "All users on a
> system..." is correct, "All users on a given system" too, so I wonder
> why "on a same system" would not be. What I meant here is "the same
> unspecified system".
>
[...]
How would you say it in French? (I'm trying to recall high school French here, so be kind ;-)
I think english "a" is like French "un" or "une" -- so translating "on a same system" literally
(using my flawed French), does "en un même système" sound right to you?
It doesn't to me, unless même has a sense of pareil used that way.
Maybe "en utilisant le même système" ? (note le/the -- not un/a)
--
Regards,
Bengt Richter
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: “Guix Profiles in Practice”
2019-10-26 10:00 ` Pierre Neidhardt
2019-10-27 3:29 ` Bengt Richter
@ 2019-10-27 13:33 ` Konrad Hinsen
2019-10-27 13:53 ` Jelle Licht
1 sibling, 1 reply; 31+ messages in thread
From: Konrad Hinsen @ 2019-10-27 13:33 UTC (permalink / raw)
To: Pierre Neidhardt, Thompson, David, help-guix; +Cc: guix-devel
Pierre Neidhardt <mail@ambrevar.xyz> writes:
> "Thompson, David" <dthompson2@worcester.edu> writes:
>
>> if it's a good idea. Probably not. So, I wonder if maybe a new
>> subcommand, say 'guix develop', could address this common development
>> use-case while allowing 'guix environment' to continue being the swiss
>> army knife that it is. Some simple naming conventions could make this
...
> This is essentially what you propose, but to have it at the CLI level
> would provide several benefits:
...
> Both issues could be addressed the same way.
Perhaps. But then, "could" doesn't imply "should". I'd love to see all
that functionality easily accessible from the CLI, but I can't say I
know how this should best be organized.
Maybe we should start a Guix CLI nursery. A project/repository separate
from Guix itself that contains a copy of the "guix" script under a
different name ("guixx" for guix-extras?) and with the same interface
for scripting modules. We could then use this to play collectively with
ideas, and if something turns out to work well, migrate it to the
official Guix CLI.
Does this sound like a good idea? Would anyone else participate in such
an experiment?
Cheers,
Konrad.
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: “Guix Profiles in Practice”
2019-10-27 13:33 ` Konrad Hinsen
@ 2019-10-27 13:53 ` Jelle Licht
0 siblings, 0 replies; 31+ messages in thread
From: Jelle Licht @ 2019-10-27 13:53 UTC (permalink / raw)
To: Konrad Hinsen, Pierre Neidhardt, Thompson, David, help-guix; +Cc: guix-devel
Konrad Hinsen <konrad.hinsen@fastmail.net> writes:
> Maybe we should start a Guix CLI nursery. A project/repository separate
> from Guix itself that contains a copy of the "guix" script under a
> different name ("guixx" for guix-extras?) and with the same interface
> for scripting modules. We could then use this to play collectively with
> ideas, and if something turns out to work well, migrate it to the
> official Guix CLI.
>
> Does this sound like a good idea? Would anyone else participate in such
> an experiment?
This could even work as a proper guix channel, once
http://issues.guix.info/issue/37399 is fixed!
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: “Guix Profiles in Practice”
2019-10-25 16:36 ` Thompson, David
` (2 preceding siblings ...)
2019-10-26 10:00 ` Pierre Neidhardt
@ 2019-11-03 14:24 ` Ludovic Courtès
2019-11-03 16:49 ` Jonathan Frederickson
2019-11-04 10:10 ` Pierre Neidhardt
3 siblings, 2 replies; 31+ messages in thread
From: Ludovic Courtès @ 2019-11-03 14:24 UTC (permalink / raw)
To: Thompson, David; +Cc: guix-devel, help-guix
Hi,
"Thompson, David" <dthompson2@worcester.edu> skribis:
> 'guix environment' is a very composable command, and it's not clear to
> me how I would add the stuff I want onto it and it's even less clear
> if it's a good idea. Probably not. So, I wonder if maybe a new
> subcommand, say 'guix develop', could address this common development
> use-case while allowing 'guix environment' to continue being the swiss
> army knife that it is. Some simple naming conventions could make this
> tool "just work." Running 'guix develop' would check for a profile
> symlink with some canonical name, for example '.guix-develop-profile'.
> If it exists, it applies the environment variables and spawns a
> subshell. If it doesn't exist, it looks for a 'develop.scm' file
> (canonical name TBD), builds the profile, symlinks it to
> '.guix-develop-profile', and then does the prior steps. The tool
> would provide a mechanism to update, etc. and it could even be
> expanded later to spawn services like databases.
That sounds like a good idea. ‘guix develop’ could keep the profiles it
manages under ~/.cache/guix.
Now, this would be very much stateful: you can’t tell in advance whether
you’re going to build a new profile based on the current Guix, or
whether you’re going to reuse a previously cached profile that could be
arbitrarily old. That doesn’t sound great.
Perhaps we should focus on improving the performance of ‘guix
environment’ first and foremost?
Thanks,
Ludo’.
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: “Guix Profiles in Practice”
2019-11-03 14:24 ` Ludovic Courtès
@ 2019-11-03 16:49 ` Jonathan Frederickson
2019-11-04 10:12 ` Pierre Neidhardt
2019-11-04 14:33 ` Ludovic Courtès
2019-11-04 10:10 ` Pierre Neidhardt
1 sibling, 2 replies; 31+ messages in thread
From: Jonathan Frederickson @ 2019-11-03 16:49 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: guix-devel, help-guix
On Nov 3, 2019, at 9:24 AM, Ludovic Courtès <ludo@gnu.org> wrote
> Now, this would be very much stateful: you can’t tell in advance whether
> you’re going to build a new profile based on the current Guix, or
> whether you’re going to reuse a previously cached profile that could be
> arbitrarily old. That doesn’t sound great.
What if something identifying the profile (directory name? config file?) included info about the Guix revision it was built from? That way a profile would be reused if it’s built from the same Guix revision, but if you switch revisions it’d be rebuilt.
I’m not sure how this would interact with a profile built from packages in multiple channels.
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: “Guix Profiles in Practice”
2019-11-03 16:49 ` Jonathan Frederickson
@ 2019-11-04 10:12 ` Pierre Neidhardt
2019-11-04 14:33 ` Ludovic Courtès
1 sibling, 0 replies; 31+ messages in thread
From: Pierre Neidhardt @ 2019-11-04 10:12 UTC (permalink / raw)
To: Jonathan Frederickson, Ludovic Courtès; +Cc: guix-devel, help-guix
[-- Attachment #1: Type: text/plain, Size: 641 bytes --]
Jonathan Frederickson <jonathan@terracrypt.net> writes:
> What if something identifying the profile (directory name? config
> file?) included info about the Guix revision it was built from? That
> way a profile would be reused if it’s built from the same Guix
> revision, but if you switch revisions it’d be rebuilt.
>
> I’m not sure how this would interact with a profile built from packages in multiple channels.
Absolutely, I was suggesting something similar in another thread: dump
the output of `guix describe -f channels` into the profile,
e.g. etc/channel-spec.scm.
--
Pierre Neidhardt
https://ambrevar.xyz/
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: “Guix Profiles in Practice”
2019-11-03 16:49 ` Jonathan Frederickson
2019-11-04 10:12 ` Pierre Neidhardt
@ 2019-11-04 14:33 ` Ludovic Courtès
1 sibling, 0 replies; 31+ messages in thread
From: Ludovic Courtès @ 2019-11-04 14:33 UTC (permalink / raw)
To: Jonathan Frederickson; +Cc: guix-devel, help-guix
Hello,
Jonathan Frederickson <jonathan@terracrypt.net> skribis:
> On Nov 3, 2019, at 9:24 AM, Ludovic Courtès <ludo@gnu.org> wrote
>> Now, this would be very much stateful: you can’t tell in advance whether
>> you’re going to build a new profile based on the current Guix, or
>> whether you’re going to reuse a previously cached profile that could be
>> arbitrarily old. That doesn’t sound great.
>
> What if something identifying the profile (directory name? config file?) included info about the Guix revision it was built from? That way a profile would be reused if it’s built from the same Guix revision, but if you switch revisions it’d be rebuilt.
Then in that case you’re just looking for a form of caching, is that
correct?
If ‘guix environment’ were 10 times faster, it’d be just fine, right?
(It’s not getting 10 times faster any time soon I’m afraid :-), but just
to make sure I understand whether we’re talking about a UI issue or a
performance issue.)
Thanks,
Ludo’.
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: “Guix Profiles in Practice”
2019-11-03 14:24 ` Ludovic Courtès
2019-11-03 16:49 ` Jonathan Frederickson
@ 2019-11-04 10:10 ` Pierre Neidhardt
2019-11-05 22:18 ` Carlo Zancanaro
1 sibling, 1 reply; 31+ messages in thread
From: Pierre Neidhardt @ 2019-11-04 10:10 UTC (permalink / raw)
To: Ludovic Courtès, Thompson, David; +Cc: guix-devel, help-guix
[-- Attachment #1: Type: text/plain, Size: 1247 bytes --]
Ludovic Courtès <ludo@gnu.org> writes:
> That sounds like a good idea. ‘guix develop’ could keep the profiles it
> manages under ~/.cache/guix.
>
> Now, this would be very much stateful: you can’t tell in advance whether
> you’re going to build a new profile based on the current Guix, or
> whether you’re going to reuse a previously cached profile that could be
> arbitrarily old. That doesn’t sound great.
This could be fixed, maybe the following way:
- Dump the channel specifications for every profile in
etc/channel-spec.scm for instance.
- Merge Konrad's time-machine script so that we can easily reuse a
channel specification to activate a profile.
> Perhaps we should focus on improving the performance of ‘guix
> environment’ first and foremost?
But isn't it orthogonal to this issue?
As I understand it, the current discussion is about "pinning"
profiles.
Should any dependency get garbage collected, an environment will need
Internet access to refetch the missing parts; I think this is what we
are trying to avoid, regardless of how fast `guix environment` is.
What about `guix environment --pin` instead of `guix develop`?
--
Pierre Neidhardt
https://ambrevar.xyz/
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: “Guix Profiles in Practice”
2019-11-04 10:10 ` Pierre Neidhardt
@ 2019-11-05 22:18 ` Carlo Zancanaro
2019-11-06 8:32 ` Pierre Neidhardt
0 siblings, 1 reply; 31+ messages in thread
From: Carlo Zancanaro @ 2019-11-05 22:18 UTC (permalink / raw)
To: Pierre Neidhardt; +Cc: guix-devel, help-guix
Hey Pierre,
On Mon, Nov 04 2019, Pierre Neidhardt wrote:
> As I understand it, the current discussion is about "pinning"
> profiles.
> Should any dependency get garbage collected, an environment will
> need
> Internet access to refetch the missing parts; I think this is
> what we
> are trying to avoid, regardless of how fast `guix environment`
> is.
>
> What about `guix environment --pin` instead of `guix develop`?
Have you used `guix environment --root`?
In my git checkout of the Guix repository I once ran `guix
environment guix --root=.environment`, and now whenever I want to
hack on Guix I start a shell and `source
.environment/etc/profile`. The .environment symlink is treated as
a GC root by Guix, and because I'm not actually invoking Guix
there's never a risk that it will attempt to fetch anything from
the internet.
Upgrading the environment is quite easy, and must be done
manually: I delete the existing symlink and run `guix environment
guix --root=.environment` again. If I'm feeling paranoid I'll run
`guix environment guix` once first to make sure it succeeds,
before deleting the old symlink and adding the
`--root=.environment` to the end.
Carlo
^ permalink raw reply [flat|nested] 31+ messages in thread