Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't use coursier bootstrap --standalone --deterministic #615

Open
jameskoch opened this issue Jul 15, 2020 · 5 comments
Open

Can't use coursier bootstrap --standalone --deterministic #615

jameskoch opened this issue Jul 15, 2020 · 5 comments

Comments

@jameskoch
Copy link

Trying out coursier bootstrap --standalone for packaging Almond for use w/o network access.

coursier bootstrap almond:0.6.0 \
      --scala-version 2.11.12 \
      --standalone \
      --deterministic \
      -o almond

Unfortunately jvm-repr artifacts being served by jitpack seem to get new timestamps each time, invalidating the deterministic aspect.

This is really just a downstream consequence of jupyter/jvm-repr#15

@alexarchambault
Copy link
Member

alexarchambault commented Jul 15, 2020

Nice catch @jameskoch.

jitpack actually does provide timestamps:

$ curl -I https://jitpack.io/com/github/jupyter/jvm-repr/0.4.0/jvm-repr-0.4.0.jar | grep -i last-modified
last-modified: Wed, 09 Jan 2019 18:50:09 Z

It seems they just aren't picked by java.net.HttpURLConnection#getLastModified, that coursier uses under-the-hood, because of the use of the Z time zone. I opened coursier/coursier#1806 for it.

@alexarchambault
Copy link
Member

I'll try to find time to look into jupyter/jvm-repr#15, it'd be nice to be able to get rid of jitpack.

@jameskoch
Copy link
Author

Nice diagnosis! I ended up just post-processing the jar to reset all timestamps. I'm not done testing yet, but hopeful I can finally move from off my custom classloader hierarchy and onto stock Almond.

While I have you, do you know if the cmd line parsing support passing multiple predef files (--predef file1 --predef file2)? I need one to load all my libraries (interp.load.cp) and then I think another to do some initialization and imports using those libraries.

@alexarchambault
Copy link
Member

do you know if the cmd line parsing support passing multiple predef files

It should (and does per its implementation). Doesn't it when you try?

@jameskoch
Copy link
Author

I was asking before I got around to trying it, sorry.

0.6.0 ended up working fine using --predef file1 --predef file2. Only small thing was that the syntax shown in --help made me think it would accept --predef file1 file2:

  ...
  --predef-code  <string>
  --predef  <string*>
  ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants