Re: [racket-dev] lib changes between versions

2015-01-07 Thread Tobias Hammer
I usually use this macro in a wrapper that require/provides the libs and  
provides compatibility wrappers when needed


;; compile time version switch
(define-syntax (version>=? stx)
  (syntax-case stx ()
[(_ min-version body body-else)
 (if (string>=? (version) (syntax-e #'min-version))
 #'body
 #'body-else)]))



On Thu, 08 Jan 2015 02:56:16 +0100, Dan Liebgold   
wrote:


Actually this issue is still perplexing me. In 5.2.1 I have my own json  
lib

which provides jsexpr->string. In 6.1 it's part of the distribution's
collects directory.

Is there a command line for racket that'll cause it to find mine under
5.2.1 and the standard lib in 6.1 (skipping mine)?

Dan

On Wed, Jan 7, 2015 at 4:51 PM, Dan Liebgold   
wrote:



Ugh. Never mind... the old json lib is mine. Carry on :)

On Wed, Jan 7, 2015 at 4:45 PM, Dan Liebgold 
wrote:



I'm maintaining the same racket code between Racket version 5.2.1 and
6.1. One thing that changed between those version was the json to  
string

(and vice versa) lib functions.

Is there a straightforward way to define those functions so they'll  
work

with both lib versions?

Thanks,
--
Dan Liebgold[dan.liebg...@gmail.com]





--
Dan Liebgold[dan.liebg...@gmail.com]





_
 Racket Developers list:
 http://lists.racket-lang.org/dev


Re: [racket-dev] lib changes between versions

2015-01-07 Thread Matthew Flatt
If your library's name is also `json` you could put in a place that is
included in PLTCOLLECTS when you run v5.2.1, but use a PLTCOLLECTS that
doesn't include it when your run v6.1 (in much the same way that you
use different PLTCOMPILEDROOTS settings for the different versions).

If your library has a different name, you could similarly point
PLTCOLLECTS at it for v.5.2.1, and use a different implementation ---
accessed either via PLTCOLLECTS or by installing as a package --- that
wraps the main-distribution one for v6.1.

At Wed, 7 Jan 2015 17:56:16 -0800, Dan Liebgold wrote:
> Actually this issue is still perplexing me. In 5.2.1 I have my own json lib
> which provides jsexpr->string. In 6.1 it's part of the distribution's
> collects directory.
> 
> Is there a command line for racket that'll cause it to find mine under
> 5.2.1 and the standard lib in 6.1 (skipping mine)?
> 
> Dan
> 
> On Wed, Jan 7, 2015 at 4:51 PM, Dan Liebgold  wrote:
> 
> > Ugh. Never mind... the old json lib is mine. Carry on :)
> >
> > On Wed, Jan 7, 2015 at 4:45 PM, Dan Liebgold 
> > wrote:
> >
> >>
> >> I'm maintaining the same racket code between Racket version 5.2.1 and
> >> 6.1. One thing that changed between those version was the json to string
> >> (and vice versa) lib functions.
> >>
> >> Is there a straightforward way to define those functions so they'll work
> >> with both lib versions?
> >>
> >> Thanks,
> >> --
> >> Dan Liebgold[dan.liebg...@gmail.com]
> >>
> >
> >
> >
> > --
> > Dan Liebgold[dan.liebg...@gmail.com]
> >
> 
> 
> 
> -- 
> Dan Liebgold[dan.liebg...@gmail.com]
> _
>   Racket Developers list:
>   http://lists.racket-lang.org/dev
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] lib changes between versions

2015-01-07 Thread Dan Liebgold
Actually this issue is still perplexing me. In 5.2.1 I have my own json lib
which provides jsexpr->string. In 6.1 it's part of the distribution's
collects directory.

Is there a command line for racket that'll cause it to find mine under
5.2.1 and the standard lib in 6.1 (skipping mine)?

Dan

On Wed, Jan 7, 2015 at 4:51 PM, Dan Liebgold  wrote:

> Ugh. Never mind... the old json lib is mine. Carry on :)
>
> On Wed, Jan 7, 2015 at 4:45 PM, Dan Liebgold 
> wrote:
>
>>
>> I'm maintaining the same racket code between Racket version 5.2.1 and
>> 6.1. One thing that changed between those version was the json to string
>> (and vice versa) lib functions.
>>
>> Is there a straightforward way to define those functions so they'll work
>> with both lib versions?
>>
>> Thanks,
>> --
>> Dan Liebgold[dan.liebg...@gmail.com]
>>
>
>
>
> --
> Dan Liebgold[dan.liebg...@gmail.com]
>



-- 
Dan Liebgold[dan.liebg...@gmail.com]
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] lib changes between versions

2015-01-07 Thread Dan Liebgold
Ugh. Never mind... the old json lib is mine. Carry on :)

On Wed, Jan 7, 2015 at 4:45 PM, Dan Liebgold  wrote:

>
> I'm maintaining the same racket code between Racket version 5.2.1 and 6.1.
> One thing that changed between those version was the json to string (and
> vice versa) lib functions.
>
> Is there a straightforward way to define those functions so they'll work
> with both lib versions?
>
> Thanks,
> --
> Dan Liebgold[dan.liebg...@gmail.com]
>



-- 
Dan Liebgold[dan.liebg...@gmail.com]
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


[racket-dev] lib changes between versions

2015-01-07 Thread Dan Liebgold
I'm maintaining the same racket code between Racket version 5.2.1 and 6.1.
One thing that changed between those version was the json to string (and
vice versa) lib functions.

Is there a straightforward way to define those functions so they'll work
with both lib versions?

Thanks,
-- 
Dan Liebgold[dan.liebg...@gmail.com]
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] LTS Racket?

2015-01-07 Thread Matthew Flatt
Some of us have discussed this in recent months. So far, our conclusion
has been "not yet".

At Mon, 05 Jan 2015 10:56:01 +, Stephen De Gabrielle wrote:
> (Sorry if this is the wrong list)
> 
> I just saw the LTS Haskell announcement, and it made me wonder if there is
> a racket equivalent?
> 
> I've had occasion to use packages from older versions of racket recently
> and the ability to run quite old code unchanged is remarkable, despite many
> significant changes to racket itself in the past few years.
> 
> The rate of change in Racket *is* terrifyingly but because of the
> remarkable backwards compatibility I'm not terribly concerned.
> 
> Kind regards and HNY,
> Stephen
> 
> Announcing LTS Haskell 1.0 | FP Complete
> https://www.fpcomplete.com/blog/2015/01/announcing-lts-haskell-1-0
> _
>   Racket Developers list:
>   http://lists.racket-lang.org/dev
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] Build error

2015-01-07 Thread Jens Axel Søgaard
It worked.

Thanks!

2015-01-07 18:45 GMT+01:00 Matthew Flatt :
> I wasn't able to replicate the problem, but I think I see what could go
> wrong. I've pushed an attempt at a repair.
>
> At Wed, 7 Jan 2015 18:31:35 +0100, Jens Axel Søgaard wrote:
>> Hi All,
>>
>> I got a contract when I tried to build racket. Any ideas?
>>
>> The main error is below.
>> Entire log is here:
>> https://gist.github.com/soegaard/aa8ea014e043a899a5a2
>>
>> /Jens Axel
>>
>>
>> package-source->name+type: contract violation
>>   expected: (or/c #f (or/c (quote name) (quote file) (quote dir)
>> (quote git) (quote github) (quote clone) (quote file-url) (quote
>> dir-url) (quote link) (quote static-link)))
>>   given: 'catalog
>>   in: the 2nd argument of
>>   (->*
>>(string?
>> (or/c
>>  #f
>>  (or/c 'name 'file 'dir 'git  'github 'clone  'file-url
>> 'dir-url  'link'static-link)))
>>
>>
>>   contract from: /pkg/name.rkt
>>
>>   blaming: /pkg/private/install.rkt
>>
>>(assuming the contract is correct)
>>
>>   at: /pkg/name.rkt:11.3
>>
>>   context...:
>>
>>
>> /Users/soegaard/racket-from-plt-git/plt/racket/collects/racket/contract/private/
>> blame.rkt:143:0:
>> raise-blame-error16
>>
>>
>> /Users/soegaard/racket-from-plt-git/plt/racket/collects/racket/contract/private/
>> arrow-val-first.rkt:283:3
>>
>>
>> /Users/soegaard/racket-from-plt-git/plt/racket/collects/pkg/private/install.rkt:
>> 925:2:
>> update-loop
>>
>>
>> /Users/soegaard/racket-from-plt-git/plt/racket/collects/racket/list.rkt:429:2:
>> append-map
>>
>>
>> /Users/soegaard/racket-from-plt-git/plt/racket/collects/pkg/private/install.rkt:
>> 1097:0:
>> pkg-update195
>>
>>
>> /Users/soegaard/racket-from-plt-git/plt/racket/collects/racket/file.rkt:368:8
>>
>>
>> /Users/soegaard/racket-from-plt-git/plt/racket/collects/racket/file.rkt:357:0:
>> call-with-file-lock40
>>
>>
>> /Users/soegaard/racket-from-plt-git/plt/racket/collects/pkg/main.rkt:307:16
>>
>>(submod 
>> /Users/soegaard/racket-from-plt-git/plt/racket/collects/pkg/main.rkt
>> main): [running body]
>>
>>/Users/soegaard/racket-from-plt-git/plt/racket/collects/pkg/raco.rkt:
>> [traversing imports]
>>
>>/Users/soegaard/racket-from-plt-git/plt/racket/collects/raco/raco.rkt:
>> [running body]
>>
>>/Users/soegaard/racket-from-plt-git/plt/racket/collects/raco/main.rkt:
>> [running body]
>>
>> make[2]: *** [plain-in-place] Error 1
>>
>> make[1]: *** [cpus-in-place] Error 2
>>
>> make: *** [in-place] Error 2
>>
>>
>> --
>> --
>> Jens Axel Søgaard
>>
>> _
>>   Racket Developers list:
>>   http://lists.racket-lang.org/dev



-- 
--
Jens Axel Søgaard

_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] Build error

2015-01-07 Thread Matthew Flatt
I wasn't able to replicate the problem, but I think I see what could go
wrong. I've pushed an attempt at a repair.

At Wed, 7 Jan 2015 18:31:35 +0100, Jens Axel Søgaard wrote:
> Hi All,
> 
> I got a contract when I tried to build racket. Any ideas?
> 
> The main error is below.
> Entire log is here:
> https://gist.github.com/soegaard/aa8ea014e043a899a5a2
> 
> /Jens Axel
> 
> 
> package-source->name+type: contract violation
>   expected: (or/c #f (or/c (quote name) (quote file) (quote dir)
> (quote git) (quote github) (quote clone) (quote file-url) (quote
> dir-url) (quote link) (quote static-link)))
>   given: 'catalog
>   in: the 2nd argument of
>   (->*
>(string?
> (or/c
>  #f
>  (or/c 'name 'file 'dir 'git  'github 'clone  'file-url
> 'dir-url  'link'static-link)))
>
> 
>   contract from: /pkg/name.rkt
> 
>   blaming: /pkg/private/install.rkt
> 
>(assuming the contract is correct)
> 
>   at: /pkg/name.rkt:11.3
> 
>   context...:
> 
>
> /Users/soegaard/racket-from-plt-git/plt/racket/collects/racket/contract/private/
> blame.rkt:143:0:
> raise-blame-error16
> 
>
> /Users/soegaard/racket-from-plt-git/plt/racket/collects/racket/contract/private/
> arrow-val-first.rkt:283:3
> 
>
> /Users/soegaard/racket-from-plt-git/plt/racket/collects/pkg/private/install.rkt:
> 925:2:
> update-loop
> 
>
> /Users/soegaard/racket-from-plt-git/plt/racket/collects/racket/list.rkt:429:2:
> append-map
> 
>
> /Users/soegaard/racket-from-plt-git/plt/racket/collects/pkg/private/install.rkt:
> 1097:0:
> pkg-update195
> 
>
> /Users/soegaard/racket-from-plt-git/plt/racket/collects/racket/file.rkt:368:8
> 
>
> /Users/soegaard/racket-from-plt-git/plt/racket/collects/racket/file.rkt:357:0:
> call-with-file-lock40
> 
>/Users/soegaard/racket-from-plt-git/plt/racket/collects/pkg/main.rkt:307:16
> 
>(submod 
> /Users/soegaard/racket-from-plt-git/plt/racket/collects/pkg/main.rkt
> main): [running body]
> 
>/Users/soegaard/racket-from-plt-git/plt/racket/collects/pkg/raco.rkt:
> [traversing imports]
> 
>/Users/soegaard/racket-from-plt-git/plt/racket/collects/raco/raco.rkt:
> [running body]
> 
>/Users/soegaard/racket-from-plt-git/plt/racket/collects/raco/main.rkt:
> [running body]
> 
> make[2]: *** [plain-in-place] Error 1
> 
> make[1]: *** [cpus-in-place] Error 2
> 
> make: *** [in-place] Error 2
> 
> 
> -- 
> --
> Jens Axel Søgaard
> 
> _
>   Racket Developers list:
>   http://lists.racket-lang.org/dev

_
  Racket Developers list:
  http://lists.racket-lang.org/dev


[racket-dev] Build error

2015-01-07 Thread Jens Axel Søgaard
Hi All,

I got a contract when I tried to build racket. Any ideas?

The main error is below.
Entire log is here:
https://gist.github.com/soegaard/aa8ea014e043a899a5a2

/Jens Axel


package-source->name+type: contract violation
  expected: (or/c #f (or/c (quote name) (quote file) (quote dir)
(quote git) (quote github) (quote clone) (quote file-url) (quote
dir-url) (quote link) (quote static-link)))
  given: 'catalog
  in: the 2nd argument of
  (->*
   (string?
(or/c
 #f
 (or/c 'name 'file 'dir 'git  'github 'clone  'file-url
'dir-url  'link'static-link)))
   

  contract from: /pkg/name.rkt

  blaming: /pkg/private/install.rkt

   (assuming the contract is correct)

  at: /pkg/name.rkt:11.3

  context...:

   
/Users/soegaard/racket-from-plt-git/plt/racket/collects/racket/contract/private/blame.rkt:143:0:
raise-blame-error16

   
/Users/soegaard/racket-from-plt-git/plt/racket/collects/racket/contract/private/arrow-val-first.rkt:283:3

   
/Users/soegaard/racket-from-plt-git/plt/racket/collects/pkg/private/install.rkt:925:2:
update-loop

   
/Users/soegaard/racket-from-plt-git/plt/racket/collects/racket/list.rkt:429:2:
append-map

   
/Users/soegaard/racket-from-plt-git/plt/racket/collects/pkg/private/install.rkt:1097:0:
pkg-update195

   /Users/soegaard/racket-from-plt-git/plt/racket/collects/racket/file.rkt:368:8

   
/Users/soegaard/racket-from-plt-git/plt/racket/collects/racket/file.rkt:357:0:
call-with-file-lock40

   /Users/soegaard/racket-from-plt-git/plt/racket/collects/pkg/main.rkt:307:16

   (submod /Users/soegaard/racket-from-plt-git/plt/racket/collects/pkg/main.rkt
main): [running body]

   /Users/soegaard/racket-from-plt-git/plt/racket/collects/pkg/raco.rkt:
[traversing imports]

   /Users/soegaard/racket-from-plt-git/plt/racket/collects/raco/raco.rkt:
[running body]

   /Users/soegaard/racket-from-plt-git/plt/racket/collects/raco/main.rkt:
[running body]

make[2]: *** [plain-in-place] Error 1

make[1]: *** [cpus-in-place] Error 2

make: *** [in-place] Error 2


-- 
--
Jens Axel Søgaard

_
  Racket Developers list:
  http://lists.racket-lang.org/dev