Re: [racket-users] Unable to track down what is requiring inclusion of tzinfo module - Resolved

2016-10-22 Thread Ian Thomas
On Saturday, October 22, 2016 at 2:34:29 PM UTC-4, Jon Zeppieri wrote:
> I changed the tzinfo and tzdata packages to remove the dynamic-require 
> behavior. If tzdata is installed, then tzinfo will use the data and will 
> define a runtime path list referring to the data files, so this should work 
> with `raco exe` now without needing to modify anything. Ian, if you have the 
> time, can you confirm that this works for you?



Jon,

The update worked for me. I had no issue running my application after updating 
the tzinfo package and recompiling my application using raco. Thanks.

-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] Unable to track down what is requiring inclusion of tzinfo module - Resolved

2016-10-22 Thread Jon Zeppieri
I changed the tzinfo and tzdata packages to remove the dynamic-require
behavior. If tzdata is installed, then tzinfo will use the data and will
define a runtime path list referring to the data files, so this should work
with `raco exe` now without needing to modify anything. Ian, if you have
the time, can you confirm that this works for you?

(Of course, if you're not on Windows, you won't need the tzdata package,
but the previous way that the code tried to use it would break with `raco
exe` regardless of what system you use.)

- Jon



On Fri, Oct 21, 2016 at 3:50 PM, Jon Zeppieri  wrote:

> This connects to a similar issue I was having with my reorganization of
> the CLDR libraries (which I'm getting back into): https://groups.google.c
> om/d/msg/racket-dev/MrmxvvKidj8/ASEF22_lBQAJ.
>
> It looks like, in the present case, I should do something like this:
>
>
> - The tzdata package includes, in its info.rkt:
>
> (define tzdata-data-files )
>
> I suppose each of the paths should have the form (list 'lib
> "tzinfo/private/data/<...>"), based on the current directory structure of
> the tzdata package.
>
> - The tzinfo code then does something like:
>
> (define-runtime-path-list tzdata-paths
>   (match (find-relevant-directories '(tzdata-data-files))
> [(cons dir _)
>   ((get-info/full dir) 'tzdata-data-files)]
> [_ #f]))
>
> Does that sound right?
>
> - Jon
>
>
>
>
> On Fri, Oct 14, 2016 at 12:39 AM, Sam Tobin-Hochstadt <
> sa...@cs.indiana.edu> wrote:
>
>> That's likely the problem. Usually you need to use define-runtime-path or
>> a variant of that to cooperate with raco exe.
>>
>> Sam
>>
>

-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] Unable to track down what is requiring inclusion of tzinfo module - Resolved

2016-10-21 Thread Jon Zeppieri
This connects to a similar issue I was having with my reorganization of the
CLDR libraries (which I'm getting back into): https://groups.google.
com/d/msg/racket-dev/MrmxvvKidj8/ASEF22_lBQAJ.

It looks like, in the present case, I should do something like this:


- The tzdata package includes, in its info.rkt:

(define tzdata-data-files )

I suppose each of the paths should have the form (list 'lib
"tzinfo/private/data/<...>"), based on the current directory structure of
the tzdata package.

- The tzinfo code then does something like:

(define-runtime-path-list tzdata-paths
  (match (find-relevant-directories '(tzdata-data-files))
[(cons dir _)
  ((get-info/full dir) 'tzdata-data-files)]
[_ #f]))

Does that sound right?

- Jon




On Fri, Oct 14, 2016 at 12:39 AM, Sam Tobin-Hochstadt 
wrote:

> That's likely the problem. Usually you need to use define-runtime-path or
> a variant of that to cooperate with raco exe.
>
> Sam
>

-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] Unable to track down what is requiring inclusion of tzinfo module - Resolved

2016-10-14 Thread Ian Thomas
On Friday, October 14, 2016 at 12:39:19 AM UTC-4, Sam Tobin-Hochstadt wrote:
> That's likely the problem. Usually you need to use define-runtime-path or a 
> variant of that to cooperate with raco exe.
> 
> Sam
> 


>From what I'm reading in the documentation, that sounds right.

"Library modules or other files that are referenced dynamically—through eval, 
load, or dynamic-require—are not automatically embedded into the created 
executable. Such modules can be explicitly included using the ++lib flag to 
raco exe. Alternately, use define-runtime-path to embed references to the 
run-time files in the executable; the files are then copied and packaged 
together with the executable when creating a distribution (as described in raco 
distribute: Sharing Stand-Alone Executables)"

https://docs.racket-lang.org/raco/exe.html

So would changing the call from dynamic-require to define-runtime-path fix the 
issue? I'll try this later today and see if this works.

-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] Unable to track down what is requiring inclusion of tzinfo module - Resolved

2016-10-13 Thread Sam Tobin-Hochstadt
That's likely the problem. Usually you need to use define-runtime-path or a
variant of that to cooperate with raco exe.

Sam

On Thu, Oct 13, 2016, 11:48 PM Jon Zeppieri  wrote:

> I'm sure someone else knows better than I do, but I guess the problem is
> that this technique (using `resolve-module-path` and `dynamic-require`)
> won't work with `raco exe`. Is that right? Or is something else going on?
>
> - Jon
>
>
> On Thu, Oct 13, 2016 at 8:55 PM, Ian Thomas  wrote:
>
> On Thursday, October 13, 2016 at 6:18:56 PM UTC-4, Ian Thomas wrote:
> >
> > I installed "gregor" using the following raco command.
> >
> >   raco pkg install gregor
> >
> > My Racket installation looks in the following directories for
> Collections:
> >
> > racket@setup/dirs> (get-collects-search-dirs)
> > '(#
> >   #
> >   #)
> >
> > Contents of "Users/ian/Library/Racket/6.6/collects", which includes
> tzinfo and the rest of Gregor's dependencies.
> >
> > $ ls ~/Library/Racket/6.6/pkgs/
> > cldr-bcp47cldr-dates-modern   cldr-numbers-modern
>  gregor-doc  memoize tzinfo
> > cldr-core cldr-localenames-modern gregor
> gregor-lib  pkgs.rktd
> >
> > I built my executable using the following raco command.
> >
> >   raco exe -o date_analyzer driver.rkt
> >
> > The executable works without issue if I don't require
> "../lib/date_analysis.rkt", which requires "gregor", but then, of course,
> I'm not able to do any date analysis.
> >
> > This one's a real mystery. Any further suggestions welcome.
>
> The issues appears to be with the tzinfo package itself that attempts to
> require submodule zoneinfo-data, but there is no zoneinfo-data submodule in
> tzinfo, nor is there currently a tzinfo/zoneinfo-data package period.
>
> $ grep zoneinfo-data -r *
> Binary file tzinfo/tzinfo/compiled/main_rkt.zo matches
> tzinfo/tzinfo/main.rkt:;; Load the zoneinfo-data package, if it's installed
> tzinfo/tzinfo/main.rkt:  (and (file-exists? (resolve-module-path
> 'tzinfo/zoneinfo-data #f))
> tzinfo/tzinfo/main.rkt:   (dynamic-require 'tzinfo/zoneinfo-data
> 'ZONEINFO-DATA)))
>
> $ find tzinfo/ -iname 'zoneinfo-data*'
> $
>
> Maybe tzinfo worked with a previous version of OS X: I'm running Sierra.
>
> $ uname -rsv
> Darwin 16.0.0 Darwin Kernel Version 16.0.0: Mon Aug 29 17:56:20 PDT 2016;
> root:xnu-3789.1.32~3/RELEASE_X86_64
>
> I resolved the issue by commenting out the following lines in
> tzinfo/tzinfo/main.rkt:
>
> ;;(define ZONEINFO-DATA
> ;;  (and (file-exists? (resolve-module-path 'tzinfo/zoneinfo-data #f))
> ;;   (dynamic-require 'tzinfo/zoneinfo-data 'ZONEINFO-DATA)))
>
> re-running raco setup, and finally recompiled my executable.
>
> --
> 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.
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> 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.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] Unable to track down what is requiring inclusion of tzinfo module - Resolved

2016-10-13 Thread Jon Zeppieri
I'm sure someone else knows better than I do, but I guess the problem is
that this technique (using `resolve-module-path` and `dynamic-require`)
won't work with `raco exe`. Is that right? Or is something else going on?

- Jon


On Thu, Oct 13, 2016 at 8:55 PM, Ian Thomas  wrote:

> On Thursday, October 13, 2016 at 6:18:56 PM UTC-4, Ian Thomas wrote:
> >
> > I installed "gregor" using the following raco command.
> >
> >   raco pkg install gregor
> >
> > My Racket installation looks in the following directories for
> Collections:
> >
> > racket@setup/dirs> (get-collects-search-dirs)
> > '(#
> >   #
> >   #)
> >
> > Contents of "Users/ian/Library/Racket/6.6/collects", which includes
> tzinfo and the rest of Gregor's dependencies.
> >
> > $ ls ~/Library/Racket/6.6/pkgs/
> > cldr-bcp47cldr-dates-modern   cldr-numbers-modern
>  gregor-doc  memoize tzinfo
> > cldr-core cldr-localenames-modern gregor
> gregor-lib  pkgs.rktd
> >
> > I built my executable using the following raco command.
> >
> >   raco exe -o date_analyzer driver.rkt
> >
> > The executable works without issue if I don't require
> "../lib/date_analysis.rkt", which requires "gregor", but then, of course,
> I'm not able to do any date analysis.
> >
> > This one's a real mystery. Any further suggestions welcome.
>
> The issues appears to be with the tzinfo package itself that attempts to
> require submodule zoneinfo-data, but there is no zoneinfo-data submodule in
> tzinfo, nor is there currently a tzinfo/zoneinfo-data package period.
>
> $ grep zoneinfo-data -r *
> Binary file tzinfo/tzinfo/compiled/main_rkt.zo matches
> tzinfo/tzinfo/main.rkt:;; Load the zoneinfo-data package, if it's installed
> tzinfo/tzinfo/main.rkt:  (and (file-exists? (resolve-module-path
> 'tzinfo/zoneinfo-data #f))
> tzinfo/tzinfo/main.rkt:   (dynamic-require 'tzinfo/zoneinfo-data
> 'ZONEINFO-DATA)))
>
> $ find tzinfo/ -iname 'zoneinfo-data*'
> $
>
> Maybe tzinfo worked with a previous version of OS X: I'm running Sierra.
>
> $ uname -rsv
> Darwin 16.0.0 Darwin Kernel Version 16.0.0: Mon Aug 29 17:56:20 PDT 2016;
> root:xnu-3789.1.32~3/RELEASE_X86_64
>
> I resolved the issue by commenting out the following lines in
> tzinfo/tzinfo/main.rkt:
>
> ;;(define ZONEINFO-DATA
> ;;  (and (file-exists? (resolve-module-path 'tzinfo/zoneinfo-data #f))
> ;;   (dynamic-require 'tzinfo/zoneinfo-data 'ZONEINFO-DATA)))
>
> re-running raco setup, and finally recompiled my executable.
>
> --
> 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.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] Unable to track down what is requiring inclusion of tzinfo module - Resolved

2016-10-13 Thread Ian Thomas
On Thursday, October 13, 2016 at 6:18:56 PM UTC-4, Ian Thomas wrote:
> 
> I installed "gregor" using the following raco command.
> 
>   raco pkg install gregor
> 
> My Racket installation looks in the following directories for Collections:
> 
> racket@setup/dirs> (get-collects-search-dirs)
> '(#
>   #
>   #)
> 
> Contents of "Users/ian/Library/Racket/6.6/collects", which includes tzinfo 
> and the rest of Gregor's dependencies.
> 
> $ ls ~/Library/Racket/6.6/pkgs/
> cldr-bcp47cldr-dates-modern   cldr-numbers-modern 
> gregor-doc  memoize tzinfo
> cldr-core cldr-localenames-modern gregor  
> gregor-lib  pkgs.rktd
> 
> I built my executable using the following raco command. 
> 
>   raco exe -o date_analyzer driver.rkt
> 
> The executable works without issue if I don't require 
> "../lib/date_analysis.rkt", which requires "gregor", but then, of course, I'm 
> not able to do any date analysis.
> 
> This one's a real mystery. Any further suggestions welcome.

The issues appears to be with the tzinfo package itself that attempts to 
require submodule zoneinfo-data, but there is no zoneinfo-data submodule in 
tzinfo, nor is there currently a tzinfo/zoneinfo-data package period.

$ grep zoneinfo-data -r *
Binary file tzinfo/tzinfo/compiled/main_rkt.zo matches
tzinfo/tzinfo/main.rkt:;; Load the zoneinfo-data package, if it's installed
tzinfo/tzinfo/main.rkt:  (and (file-exists? (resolve-module-path 
'tzinfo/zoneinfo-data #f))
tzinfo/tzinfo/main.rkt:   (dynamic-require 'tzinfo/zoneinfo-data 
'ZONEINFO-DATA)))

$ find tzinfo/ -iname 'zoneinfo-data*'
$ 

Maybe tzinfo worked with a previous version of OS X: I'm running Sierra.

$ uname -rsv
Darwin 16.0.0 Darwin Kernel Version 16.0.0: Mon Aug 29 17:56:20 PDT 2016; 
root:xnu-3789.1.32~3/RELEASE_X86_64

I resolved the issue by commenting out the following lines in 
tzinfo/tzinfo/main.rkt:

;;(define ZONEINFO-DATA
;;  (and (file-exists? (resolve-module-path 'tzinfo/zoneinfo-data #f))
;;   (dynamic-require 'tzinfo/zoneinfo-data 'ZONEINFO-DATA)))

re-running raco setup, and finally recompiled my executable.

-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] Unable to track down what is requiring inclusion of tzinfo module

2016-10-13 Thread Ian Thomas
On Thursday, October 13, 2016 at 2:05:53 PM UTC-4, Vincent St-Amour wrote:
> The tzinfo dependency comes from gregor (well, from gregor-lib, which
> gregor depends on).
> 
> But, I would have also expected installing gregor to pull in that
> dependency. How did you install gregor?
> 
> Vincent

I installed "gregor" using the following raco command.

  raco pkg install gregor

My Racket installation looks in the following directories for Collections:

racket@setup/dirs> (get-collects-search-dirs)
'(#
  #
  #)

Contents of "Users/ian/Library/Racket/6.6/collects", which includes tzinfo and 
the rest of Gregor's dependencies.

$ ls ~/Library/Racket/6.6/pkgs/
cldr-bcp47  cldr-dates-modern   cldr-numbers-modern 
gregor-doc  memoize tzinfo
cldr-core   cldr-localenames-modern gregor  
gregor-lib  pkgs.rktd

I built my executable using the following raco command. 

  raco exe -o date_analyzer driver.rkt

The executable works without issue if I don't require 
"../lib/date_analysis.rkt", which requires "gregor", but then, of course, I'm 
not able to do any date analysis.

This one's a real mystery. Any further suggestions welcome.

-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] Unable to track down what is requiring inclusion of tzinfo module

2016-10-13 Thread Vincent St-Amour
The tzinfo dependency comes from gregor (well, from gregor-lib, which
gregor depends on).

But, I would have also expected installing gregor to pull in that
dependency. How did you install gregor?

Vincent



On Thu, 13 Oct 2016 13:02:09 -0500,
Ian Thomas wrote:
> 
> Hello list,
> 
> I'm receiving the following error when trying to run my application:
> 
> ./date_analyzer --help
> 
> standard-module-name-resolver: collection not found
>   for module path: tzinfo/zoneinfo-data
>   collection: "tzinfo"
>   in collection directories:
>   context...:
>show-collection-err
>standard-module-name-resolver
>/Applications/Racket v6.6/collects/syntax/modresolve.rkt:58:0: 
> resolve-module-path11
>/Applications/Racket 
> v6.6/collects/racket/contract/private/arrow-val-first.rkt:306:25
>#%embedded:g2357:main: [running body]
>#%embedded:g2314:main: [traversing imports]
>#%embedded:g2249:date_analysis: [traversing imports]
>#%mzc:driver: [traversing imports]
>loop
> 
> My application is made up of the following 5 files, with the requirements 
> listed after each, and none of the files contain functions from the tzinfo 
> package. 
> 
> bin/driver.rkt
> #lang racket
> (require racket/base
>racket/cmdline
>  "../lib/date_analysis.rkt")
> 
> lib/date_analysis.rkt
> #lang racket
> (require gregor
>"series.rkt")
> 
> lib/ipt_file.rkt
> #lang racket
> 
> lib/series.rkt
> #lang racket
> 
> test/test.rkt
> #lang racket
> (require "series.rkt")
> 
> Additional suggestions on other things to try to track down the source of 
> this bug are welcome.
> 
> 
> -- 
> 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.
> For more options, visit https://groups.google.com/d/optout.

-- 
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.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Unable to track down what is requiring inclusion of tzinfo module

2016-10-13 Thread Ian Thomas
Hello list,

I'm receiving the following error when trying to run my application:

./date_analyzer --help

standard-module-name-resolver: collection not found
  for module path: tzinfo/zoneinfo-data
  collection: "tzinfo"
  in collection directories:
  context...:
   show-collection-err
   standard-module-name-resolver
   /Applications/Racket v6.6/collects/syntax/modresolve.rkt:58:0: 
resolve-module-path11
   /Applications/Racket 
v6.6/collects/racket/contract/private/arrow-val-first.rkt:306:25
   #%embedded:g2357:main: [running body]
   #%embedded:g2314:main: [traversing imports]
   #%embedded:g2249:date_analysis: [traversing imports]
   #%mzc:driver: [traversing imports]
   loop

My application is made up of the following 5 files, with the requirements 
listed after each, and none of the files contain functions from the tzinfo 
package. 

bin/driver.rkt
#lang racket
(require racket/base
 racket/cmdline
 "../lib/date_analysis.rkt")

lib/date_analysis.rkt
#lang racket
(require gregor
 "series.rkt")

lib/ipt_file.rkt
#lang racket

lib/series.rkt
#lang racket

test/test.rkt
#lang racket
(require "series.rkt")

Additional suggestions on other things to try to track down the source of this 
bug are welcome.


-- 
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.
For more options, visit https://groups.google.com/d/optout.