I think it's fine to use `info` in that way. One of the intended properties of "info.rkt" is that it can be accessed without running arbitrary code. Accessing an `info` submodule, however, might involve arbitrary code to compile the enclosing module. So, I'm not sure how an `info` submodule might work for the package system and/or `raco setup`, but if we ever want to do something like that, it certainly seems safe to use `info` in the way you describe.
At Sat, 27 Feb 2016 20:40:05 -0500, Neil Van Dyke wrote: > If I were to start putting "(module+ info" in my packages, which would > effectively duplicate within "main.rkt" the contents of "info.rkt"... > are you pretty confident that would continue to work in the future, > should Racket ever support an `info` submodule as an alternative to > "info.rkt"? > > The reason I ask is that I want to replace McFly with a simpler setup, > which treats an `info` submodule as the canonical `info` module for the > package, and generates "info.rkt" from it. The `info` submodule would > have the usual Racket stuff, plus a few additional things > (copyright/licensing/legal, manifest, version history). This, combined > with my embedded docs format, gives me the normal case of only one > edited source file per package, and simplifies what the tool does. > > I see two phases: > > 1. Programmer writes and maintains "mypackage/main.rkt", with `info` > submodule and embedded docs. Tool maintains "mypackage/info.rkt" and > "mypackage/mypackage.scrbl", but programmer never modifies those 2 > files, and rarely has to know they exist. > > 2. If Racket ever supports `info` submodule (in lieu of "info.rkt") and > single-file packages, programmer can often rename "mypackage/main.rkt" > to "mypackage.rkt", and be done. I think this might have "lightweight" > implications. > > BTW, I said "(module+ info" because I expect to want two chunks of > `info` submodule in the file: most of the metadata at the top of the > file, and the big release/change history info at the bottom of the > file. I'm leaning towards having the history in `info` submodule rather > than embedded Scribble docs, so that writing the tool is easier (there > are release-time checks it will do on history), and I don't have to add > Scribble extensions. > > Neil V. > > -- > You received this message because you are subscribed to the Google Groups > "Racket Developers" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/racket-dev/56D24FF5.3020809%40neilvandyke.org > . > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Racket Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/racket-dev/56d2ee80.620e430a.6895.332aSMTPIN_ADDED_MISSING%40gmr-mx.google.com. For more options, visit https://groups.google.com/d/optout.
