james.swaine
2018-3-10 14:47:13

@james.swaine has joined the channel


james.swaine
2018-3-10 14:50:35

Is there anything analogous to a Gemfile or cabal file in the pkg system?


samth
2018-3-10 15:55:37

@james.swaine info.rkt is the analagous file


james.swaine
2018-3-10 15:57:12

Will that work regardless of whether I’m making a package myself? In other words raco pkg knows to look for that in the current working directory?


samth
2018-3-10 18:15:03

@james.swaine I’m not sure what you mean


samth
2018-3-10 18:15:24

Racket doesn’t (really) have a concept analagous to cabal build


samth
2018-3-10 18:15:51

raco pkg install with no other arguments looks in the current directory


samth
2018-3-10 18:16:23

other raco pkg subcommands don’t do things where the current directory is relevant


samth
2018-3-10 18:16:59

every other pkg-related command (such as raco setup or raco test) take pkg names as arguments (in their modes where they consult packages)


greg
2018-3-10 18:57:31

@james.swaine To add to what @samth said: When developing a package locally, say in a foo directory: From the parent dir of foo, you can do raco pkg install --link foo, once. (Note the --link.) Thereafter, foo is a package name that raco pkg commands will understand, regardless of the current directory. (Maybe you already knew this, but just in case that might be a point of confusion.)


samth
2018-3-10 18:58:59

To further add, note that raco pkg install in the foo directory does what @greg says as well, without knowing any options :slightly_smiling_face:


greg
2018-3-10 18:59:45

Oh. :slightly_smiling_face: Did it always, even in older Racket versions? Once upon a time, I learned --link as a magic spell.


greg
2018-3-10 19:01:21

Anyway, I think my point is, that initial install (with or w/o --link :smile:) will name the package and then you can use that name with raco pkg — in case that wasn’t clear.


samth
2018-3-10 19:02:04

@greg it’s possible that there was a release with that behavior


samth
2018-3-10 19:02:32

also it infers --link if you type a directory name, so raco pkg install foo/ will work too


greg
2018-3-10 19:06:01

the Spanish Inquisition has one main way of naming packages …



james.swaine
2018-3-10 20:57:34

sorry, i don’t think i was clear in what i was after before. suppose i’m making a little sample app called thing i want to put on github or whatever. i make a directory called thing and inside it i have main.rkt and helpers.rkt. code in both of those files may use functions from packages A, B, and C. i’m wondering whether i could add an info.rkt file and raco pkg install or some other pkg command could be used to just install all dependencies listed in there. analogous in Ruby to having a Gemfile and running bundle install


greg
2018-3-10 22:04:29

Yes, you can.


abmclin
2018-3-10 22:04:30

Yes info.rkt is where pkg dependencies are listed. An easy shortcut to figuring out which dependencies to put in info.rkt first do a raco pkg install inside the thing directory to install your pkg. Once it’s installed and assuming your pkg is implementing a collection also called thing then do raco setup -l thing --fix-pkg-deps which will adjust your thing pkg’s info.rkt to have the missing dependencies raco setup finds


abmclin
2018-3-10 22:05:54

-l thing option tells setup to only limit itself to checking thing collection’s pkg to avoid scanning everything that’s installed