Re: [racket-users] Re: Best way to handle different versions of Racket?

2020-04-04 Thread Siddhartha Kasivajhula
These sound like three different, alternative ways to do it! Nice to know
there are options which presumably each have their merits.

@Greg I'm using your Makefile template already
 :)


On Fri, Apr 3, 2020 at 6:54 AM Greg Hendershott 
wrote:

> Is there a standard/recommended way to handle multiple versions of Racket
>> in library code?
>>
>
> 1. You can use dynamic-require to see if the new thing is actually
> provided by a module, and in a with-handlers clause substitute your
> not-found, default behavior.
>
> If you do that frequently you could wrap that in a little macro like this:
>
>
> https://github.com/greghendershott/racket-mode/blob/master/racket/util.rkt#L86-L101
>
> 2. You could run tests using Travis CI or similar, against multiple/older
> versions of Racket.  For example:
>
>   https://github.com/greghendershott/racket-mode/blob/master/.travis.yml
>
>   https://github.com/greghendershott/travis-racket
>
> --
> You received this message because you are subscribed to the Google Groups
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to racket-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/racket-users/1abd44b5-cec8-4c1a-a7d1-e2096f5a839d%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CACQBWFmu88RLrY06gLRrsm65fNi%2Bf7c9uW8H_OASoCtnq57e5Q%40mail.gmail.com.


[racket-users] Re: Best way to handle different versions of Racket?

2020-04-03 Thread Greg Hendershott

>
> Is there a standard/recommended way to handle multiple versions of Racket 
> in library code?
>

1. You can use dynamic-require to see if the new thing is actually provided 
by a module, and in a with-handlers clause substitute your not-found, 
default behavior.

If you do that frequently you could wrap that in a little macro like this:

  
https://github.com/greghendershott/racket-mode/blob/master/racket/util.rkt#L86-L101

2. You could run tests using Travis CI or similar, against multiple/older 
versions of Racket.  For example:

  https://github.com/greghendershott/racket-mode/blob/master/.travis.yml

  https://github.com/greghendershott/travis-racket

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/1abd44b5-cec8-4c1a-a7d1-e2096f5a839d%40googlegroups.com.