oyvindberg / bleep

A bleeping fast scala build tool!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

megri opened this issue · comments

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.

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

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.

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

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

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.

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.)

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.

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.