[racket-users] Re: Git-Backed Racket Packages, git archive

2019-06-17 Thread Eric Eide
Matthew Butterick writes: > Once upon a time I tried to do the same for Pollen and couldn't sort it > out. AFAICT the git hash isn't generated until the commit is made. That's true; you can't figure out the hash before the commit is made. I think I have the pieces of a workable (for me)

Re: [racket-users] Re: Git-Backed Racket Packages, git archive

2019-06-17 Thread Matthew Butterick
> On Jun 17, 2019, at 10:23 AM, Eric Eide wrote: > > Communicate with users. I want to put the appropriate git hash into the > output > of my program (Xsmith-based random program generators) so that I can attempt > to > reproduce the output, if necessary. Once upon a time I tried to do the

Re: [racket-users] Re: Git-Backed Racket Packages, git archive

2019-06-17 Thread Robby Findler
But stepping back a little bit, I'm curious why you're doing this more generally. Is this a way to communicate with users about what version they are using somehow or to tell them how to get specific versions that aren't the version listed on pkgs.racket-lang.org? Robby On Mon, Jun 17, 2019 at

Re: [racket-users] Re: Git-Backed Racket Packages, git archive

2019-06-17 Thread Robby Findler
On Mon, Jun 17, 2019 at 12:23 PM Eric Eide wrote: > > Robby Findler writes: > > > But stepping back a little bit, I'm curious why you're doing this more > > generally. Is this a way to communicate with users about what version > > they are using somehow or to tell them how to get specific

[racket-users] Re: Git-Backed Racket Packages, git archive

2019-06-17 Thread Eric Eide
Robby Findler writes: > But stepping back a little bit, I'm curious why you're doing this more > generally. Is this a way to communicate with users about what version > they are using somehow or to tell them how to get specific versions > that aren't the version listed on pkgs.racket-lang.org?

[racket-users] Re: Git-Backed Racket Packages, git archive

2019-06-17 Thread Eric Eide
Sam Tobin-Hochstadt writes: > If you want "best-effort checksum associated with this code in some > way" then combining the information from `pkg-info` with calling the > git binary is probably necessary. Yes, "best-effort checksum" is what I'm trying to do. Thanks again for the help! --

Re: [racket-users] Re: Git-Backed Racket Packages, git archive

2019-06-17 Thread Sam Tobin-Hochstadt
I guess I don't fully understand what you're trying to accomplish. In general, a Racket package might live inside some git repository on the file system, but Racket wouldn't necessarily know anything about that. If you want "best-effort checksum associated with this code in some way" then

[racket-users] Re: Git-Backed Racket Packages, git archive

2019-06-16 Thread Eric Eide
Sam Tobin-Hochstadt writes: > What do you need the hash for? Could you get the hash from the package > system, for example: > >> (require pkg/lib) >> (pkg-info-checksum (hash-ref (installed-pkg-table) "z3")) > "84059a4428454cc6edd57865befaedb1d29dedce" This trick does not work (in my tests so

[racket-users] Re: Git-Backed Racket Packages, git archive

2019-06-13 Thread Eric Eide
Philip McGrath writes: > According to §2.2 Package Sources, for a Git package source in the syntax > ‹scheme›://‹host›/.../‹repo› [.git][/][?path=‹path›][#‹rev›], "the package’s > checksum is the hash identifying ‹rev› if ‹rev› is a branch or tag, otherwise > ‹rev› itself serves as the

Re: [racket-users] Re: Git-Backed Racket Packages, git archive

2019-06-13 Thread Philip McGrath
According to §2.2 Package Sources , for a Git package source in the syntax ‹scheme›://‹host›/.../‹repo›[.git][/][?path=‹path›][#‹rev›], "the package’s checksum is the hash identifying ‹rev› if ‹rev› is a branch or

[racket-users] Re: Git-Backed Racket Packages, git archive

2019-06-13 Thread Eric Eide
Sam Tobin-Hochstadt writes: > What do you need the hash for? Could you get the hash from the package > system, for example: I want to know the ("a") hash so that I can reliably reproduce outputs, diagnose crashes, etc. The package hash might work; thank you for pointing it out! I'll have to

Re: [racket-users] Re: Git-Backed Racket Packages, git archive

2019-06-13 Thread Sam Tobin-Hochstadt
What do you need the hash for? Could you get the hash from the package system, for example: > (require pkg/lib) > (pkg-info-checksum (hash-ref (installed-pkg-table) "z3")) "84059a4428454cc6edd57865befaedb1d29dedce" Sam On Thu, Jun 13, 2019 at 2:59 PM Eric Eide wrote: > > Matthew Flatt writes:

[racket-users] Re: Git-Backed Racket Packages, git archive

2019-06-13 Thread Eric Eide
Matthew Flatt writes: > The simplistic answer is that `git-checkout` doesn't support a `git > archive`-like mode. And a practical answer is that no one is likely to > implement it in the near term. :) Thanks for the explanation! As you might have guessed, my goal is to figure out how to insert

Re: [racket-users] Re: Git-Backed Racket Packages, git archive

2019-06-13 Thread Matthew Flatt
At Thu, 13 Jun 2019 11:24:03 -0600, Eric Eide wrote: > As described here , > > > When a Git repository is specified as a package source, then a copy of the > > repository content is installed as the package implementation. That > > installation

[racket-users] Re: Git-Backed Racket Packages, git archive

2019-06-13 Thread Eric Eide
Argh, I screwed up the subject line of my question email :-/. I always have to remind myself that the command is `git archive`, not `git export`. Sorry for any confusion. -- --- Eric Eide . University of Utah