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

Replace ${PROJECT_DIR} and similar in all parts of the config. #362

Open
megri opened this issue Sep 22, 2023 · 8 comments
Open

Replace ${PROJECT_DIR} and similar in all parts of the config. #362

megri opened this issue Sep 22, 2023 · 8 comments

Comments

@megri
Copy link
Contributor

megri commented Sep 22, 2023

I am playing around with GraalVM 21 which is not yet available in the Coursier index.json. To work around this I've added a oracle-index.json at the project root with the contents

{
    "darwin": {
        "arm64": {
            "jdk@graalvm-java21": {
                "21": "tgz+https://download.oracle.com/graalvm/21/latest/graalvm-jdk-21_macos-aarch64_bin.tar.gz"
            }
        }
    }
}

I can use this index and platform with the following configuration

jvm:
  index: file:///Users/me/dev/my-sandbox-project/oracle-index.json
  name: graalvm-java21:21
…

It would be nice if I could instead use something like index: file//${PROJECT_DIR}/oracle-index.json to make it portable.

@oyvindberg
Copy link
Owner

more than adding this I'd like an up to date index really. I wonder if something can be done to automate the scripts which produce that index file

@megri
Copy link
Contributor Author

megri commented Sep 22, 2023

I agree that would be preferable in this case. Still, what if I want to use a nightly build or something equally unofficial? It seems to me that I can work around not having the index parameter interpolated by publishing my own index and reading it from there, but that's just an inconvenience.

On the other hand, if the solution is always to update the default index then why expose the index parameter at all.

@oyvindberg
Copy link
Owner

Using a nightly JVM feels very niche, so I tend to think that it's ok with that just being supported through the system JVM, honestly.

Why do you have that need? :D

@oyvindberg
Copy link
Owner

You can by the way do like I do with the bleep coursier and just refer to a checked in version in git with its https url

@megri
Copy link
Contributor Author

megri commented Sep 22, 2023

Using a nightly JVM feels very niche, so I tend to think that it's ok with that just being supported through the system JVM, honestly.

Why do you have that need? :D

Well, the need stems from wanting to have reproducible builds ;) If I publish a repo with experiments using a pre-build of Valhalla for instance.

@megri
Copy link
Contributor Author

megri commented Oct 11, 2023

Just so I understand, are you opposed to doing placeholder injection in this part of the config, or is the use-case unclear? FWIW the default index is still not updated. I could of course publish the index file as mentioned before but that's at best an inconvenience and at worst not workable (private repository for instance.)

@oyvindberg
Copy link
Owner

You're in luck, I also want a local index file now since the coursier index is slow to update :D

There seems to be some trouble with all the different graalvm releases, see coursier/jvm-index#216

I think I want to limit ${PROJECT_DIR} and friends as much as necessary since it feels hackish, but the rest of the build is oriented around relative paths. I think the index could be either a url or a relative path (relative to the build file), and this would work fantastically.

@megri
Copy link
Contributor Author

megri commented Oct 13, 2023

You're in luck, I also want a local index file now since the coursier index is slow to update :D
😁

There seems to be some trouble with all the different graalvm releases, see coursier/jvm-index#216

I think I want to limit ${PROJECT_DIR} and friends as much as necessary since it feels hackish, but the rest of the build is oriented around relative paths. I think the index could be either a url or a relative path (relative to the build file), and this would work fantastically.

That sounds great! As an additional benefit it would look nicer without the file:///… prefix.

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