[racket] raco pkg create
On Mon, Dec 1, 2014 at 6:37 AM, Neil Van Dyke <neil at neilvandyke.org> wrote:
> Am I doing something wrong? `raco pkg create --binary` is including source
> files (and other non-`compiled` files), which seems inconsistent with its
> documentation. This is in Racket 6.1.1.
It looks to me like you haven't build the package by running raco make
or raco setup. raco create won't do the compilation, it just
determines whether to include the files produced therewith or not.
> Side question: Is `raco pkg create` supposed to use the `MANIFEST` file?
> (It didn't look like it was documented to, but I double-checked, and it
> isn't, though that would be helpful.)
It doesn't use it. The MANIFEST is only used for downloading packages
from URLs that are directories. Its existence is just there because
there's no way to get a directory index with HTTP. raco pkg create can
CREATE a MANIFEST for you though.
I highly recommend not using package sources other than git because
they require you to do something you wouldn't otherwise do every time
you make a change to your code and they make it difficult for users to
get old checksums.
Jay
>
> [/tmp/mypackage] ls
> info.rkt main.rkt MANIFEST mypackage.rkt thisfileisnotused
>
> [/tmp/mypackage] cat MANIFEST
> info.rkt
> main.rkt
> mypackage.rkt
>
> [/tmp/mypackage] raco pkg create --format tgz --source $(pwd)
> packing into /tmp/mypackage/mypackage.tgz
> writing package checksum to /tmp/mypackage/mypackage.tgz.CHECKSUM
> [/tmp/mypackage] tar tvfz mypackage.tgz
> -rw-r--r-- root/root 32 2014-12-01 02:37 MANIFEST
> -rw-r--r-- root/root 93 2014-11-30 09:53 info.rkt
> -rw-r--r-- root/root 85 2014-11-30 09:22 main.rkt
> -rw-r--r-- root/root 84 2014-12-01 02:37 mypackage.rkt
> -rw-r--r-- root/root 75 2014-12-01 02:37 thisfileisnotused
> [/tmp/mypackage] rm -rf mypackage.tgz mypackage.tgz.CHECKSUM compiled
>
> [/tmp/mypackage] raco pkg create --format tgz --binary $(pwd)
> packing into /tmp/mypackage/mypackage.tgz
> writing package checksum to /tmp/mypackage/mypackage.tgz.CHECKSUM
> [/tmp/mypackage] tar tvfz mypackage.tgz
> -rw-r--r-- root/root 32 2014-12-01 06:18 MANIFEST
> drwxr-xr-x root/root 0 2014-12-01 06:18 compiled
> -rw-r--r-- root/root 135 2014-12-01 06:18 compiled/info_rkt.dep
> -rw-r--r-- root/root 872 2014-12-01 06:18 compiled/info_rkt.zo
> -rw-r--r-- root/root 217 2014-12-01 06:18 info.rkt
> -rw-r--r-- root/root 85 2014-11-30 09:22 main.rkt
> -rw-r--r-- root/root 84 2014-12-01 02:37 mypackage.rkt
> -rw-r--r-- root/root 75 2014-12-01 06:18 thisfileisnotused
> [/tmp/mypackage] rm -rf mypackage.tgz mypackage.tgz.CHECKSUM compiled
>
> [/tmp/mypackage] raco pkg create --format tgz --built $(pwd)
> packing into /tmp/mypackage/mypackage.tgz
> writing package checksum to /tmp/mypackage/mypackage.tgz.CHECKSUM
> [/tmp/mypackage] tar tvfz mypackage.tgz
> -rw-r--r-- root/root 32 2014-12-01 06:19 MANIFEST
> drwxr-xr-x root/root 0 2014-12-01 06:19 compiled
> -rw-r--r-- root/root 135 2014-12-01 06:19 compiled/info_rkt.dep
> -rw-r--r-- root/root 803 2014-12-01 06:19 compiled/info_rkt.zo
> -rw-r--r-- root/root 181 2014-12-01 06:19 info.rkt
> -rw-r--r-- root/root 85 2014-11-30 09:22 main.rkt
> -rw-r--r-- root/root 84 2014-12-01 02:37 mypackage.rkt
> -rw-r--r-- root/root 75 2014-12-01 06:19 thisfileisnotused
> [/tmp/mypackage] rm -rf mypackage.tgz mypackage.tgz.CHECKSUM compiled
>
> [/tmp/mypackage] rm MANIFEST
> [/tmp/mypackage] ls
> info.rkt main.rkt mypackage.rkt thisfileisnotused
>
> [/tmp/mypackage] raco pkg create --format tgz --source $(pwd)
> packing into /tmp/mypackage/mypackage.tgz
> writing package checksum to /tmp/mypackage/mypackage.tgz.CHECKSUM
> [/tmp/mypackage] tar tvfz mypackage.tgz
> -rw-r--r-- root/root 93 2014-11-30 09:53 info.rkt
> -rw-r--r-- root/root 85 2014-11-30 09:22 main.rkt
> -rw-r--r-- root/root 84 2014-12-01 02:37 mypackage.rkt
> -rw-r--r-- root/root 75 2014-12-01 02:37 thisfileisnotused
> [/tmp/mypackage] rm -rf mypackage.tgz mypackage.tgz.CHECKSUM compiled
>
> [/tmp/mypackage] raco pkg create --format tgz --binary $(pwd)
> packing into /tmp/mypackage/mypackage.tgz
> writing package checksum to /tmp/mypackage/mypackage.tgz.CHECKSUM
> [/tmp/mypackage] tar tvfz mypackage.tgz
> drwxr-xr-x root/root 0 2014-12-01 06:21 compiled
> -rw-r--r-- root/root 135 2014-12-01 06:21 compiled/info_rkt.dep
> -rw-r--r-- root/root 872 2014-12-01 06:21 compiled/info_rkt.zo
> -rw-r--r-- root/root 217 2014-12-01 06:21 info.rkt
> -rw-r--r-- root/root 85 2014-11-30 09:22 main.rkt
> -rw-r--r-- root/root 84 2014-12-01 02:37 mypackage.rkt
> -rw-r--r-- root/root 75 2014-12-01 06:21 thisfileisnotused
> [/tmp/mypackage] rm -rf mypackage.tgz mypackage.tgz.CHECKSUM compiled
>
> [/tmp/mypackage] raco pkg create --format tgz --built $(pwd)
> packing into /tmp/mypackage/mypackage.tgz
> writing package checksum to /tmp/mypackage/mypackage.tgz.CHECKSUM
> [/tmp/mypackage] tar tvfz mypackage.tgz
> drwxr-xr-x root/root 0 2014-12-01 06:21 compiled
> -rw-r--r-- root/root 135 2014-12-01 06:21 compiled/info_rkt.dep
> -rw-r--r-- root/root 803 2014-12-01 06:21 compiled/info_rkt.zo
> -rw-r--r-- root/root 181 2014-12-01 06:21 info.rkt
> -rw-r--r-- root/root 85 2014-11-30 09:22 main.rkt
> -rw-r--r-- root/root 84 2014-12-01 02:37 mypackage.rkt
> -rw-r--r-- root/root 75 2014-12-01 06:21 thisfileisnotused
>
> [/tmp/mypackage] which raco
> /usr/local/racket-6.1.1/bin/raco
>
> Neil V.
>
> ____________________
> Racket Users list:
> http://lists.racket-lang.org/users
--
Jay McCarthy
http://jeapostrophe.github.io
"Wherefore, be not weary in well-doing,
for ye are laying the foundation of a great work.
And out of small things proceedeth that which is great."
- D&C 64:33