Re: [racket-dev] raco pkg and github
Thanks for finding that out. I just pushed this change (with a test) Jay On Fri, Feb 1, 2013 at 8:44 AM, Jens Axel Søgaard jensa...@soegaard.net wrote: 2013/2/1 Asumu Takikawa as...@ccs.neu.edu: On 2013-02-01 06:23:06 -0700, Jay McCarthy wrote: I had originally tried to do that, but Github wasn't providing tar balls for anything other than branch HEADs and tags. I'm surprised that it works for you and not for me. Am I just crazy or did you set something on your repository to make it work? Maybe it's a new feature they added recently? I think Jens was saying on IRC that it wasn't documented in the API. It was about 6-7 months ago I checked, and back then I couldn't find anything. Now I see it here: http://developer.github.com/v3/repos/contents/#get-archive-link The v3 API was in beta from June, so I might have been looking at the v2 API back then. Anyways, great find Asumu. /Jens Axel -- Jay McCarthy j...@cs.byu.edu Assistant Professor / Brigham Young University http://faculty.cs.byu.edu/~jay The glory of God is Intelligence - DC 93 _ Racket Developers list: http://lists.racket-lang.org/dev
Re: [racket-dev] raco pkg and github
On Sat, Feb 2, 2013 at 9:19 AM, Ray Racine ray.rac...@gmail.com wrote: I saw a blurb this week where Microsoft is using http://libgit2.github.com/ to add git support into their tooling (Visual Studio no less) and their devs have been committing to fill in any MS specific git gaps. It looks like a top quality project, claiming to be small, clean, no-deps, and cross platform smooth. Is the option to use Racket's FFI to libgit2 just a time and resources thing? I think so. It's one of the Intro Projects listed in the wiki: https://github.com/plt/racket/wiki/Intro-Projects It looks like Joan Arnaldich has started work on it: https://github.com/jarnaldich/racket-git _ Racket Developers list: http://lists.racket-lang.org/dev
Re: [racket-dev] raco pkg and github
2013/2/1 Asumu Takikawa as...@ccs.neu.edu: On 2013-02-01 06:23:06 -0700, Jay McCarthy wrote: I had originally tried to do that, but Github wasn't providing tar balls for anything other than branch HEADs and tags. I'm surprised that it works for you and not for me. Am I just crazy or did you set something on your repository to make it work? Maybe it's a new feature they added recently? I think Jens was saying on IRC that it wasn't documented in the API. It was about 6-7 months ago I checked, and back then I couldn't find anything. Now I see it here: http://developer.github.com/v3/repos/contents/#get-archive-link The v3 API was in beta from June, so I might have been looking at the v2 API back then. Anyways, great find Asumu. /Jens Axel _ Racket Developers list: http://lists.racket-lang.org/dev
[racket-dev] raco pkg and github
Hi all, One thing that a few people using `raco pkg` (including myself) have found is that when you upload a package to pkg.racket-lang.org that's hosted on github, you can easily get checksum errors. The checksum mismatch happens when the github HEAD has been updated, but the checksum on the PNS is out of date. The behavior that I expected was that `raco pkg` would just download the commit matching the PNS checksum from github and use that. Is there any design reason to not do that instead? Attached is a hackish patch that just demonstrates that this is do-able. As an example, you can try `raco pkg install sweet-exp`, which will install commit fbd09b4be38b rather than the current github HEAD. Cheers, Asumu From b1e89c1b30338d9b6788799c47ccfe247fa592da Mon Sep 17 00:00:00 2001 From: Asumu Takikawa as...@ccs.neu.edu Date: Wed, 30 Jan 2013 17:42:59 -0500 Subject: [PATCH] A hack to make checksums more flexible for github --- collects/planet2/lib.rkt | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/collects/planet2/lib.rkt b/collects/planet2/lib.rkt index d5404f3..699170e 100644 --- a/collects/planet2/lib.rkt +++ b/collects/planet2/lib.rkt @@ -398,7 +398,9 @@ #:force? [force? #f] descs) (define check-sums? (not ignore-checksums?)) - (define (install-package pkg given-type given-pkg-name) + (define (install-package pkg given-type given-pkg-name + ;; This is hackish, but it demonstrates it works + #:index-checksum [index-checksum #f]) (define-values (inferred-pkg-name type) (if (path? pkg) (package-source-name+type (path-string pkg) @@ -428,6 +430,7 @@ (update-install-info-orig-pkg (match type ['github +(set! checksum index-checksum) (unless checksum (pkg-error (~a could not find checksum for github package source, which implies it doesn't exist\n source: ~a) @@ -437,7 +440,7 @@ (define new-url (url https #f github.com #f #t (map (λ (x) (path/param x empty)) -(list user repo tarball branch)) +(list user repo tarball checksum)) empty #f)) (define tmp.tgz @@ -644,7 +647,8 @@ (define checksum (hash-ref index-info 'checksum)) (define info (install-package source #f -pkg-name)) +pkg-name +#:index-checksum checksum)) (when (and (install-info-checksum info) check-sums? (not (equal? (install-info-checksum info) checksum))) -- 1.7.10.4 _ Racket Developers list: http://lists.racket-lang.org/dev