Skip to content
This repository has been archived by the owner on Jan 25, 2023. It is now read-only.

Customizable Java version #788

Open
kennyjwilli opened this issue Jun 15, 2022 · 2 comments
Open

Customizable Java version #788

kennyjwilli opened this issue Jun 15, 2022 · 2 comments
Labels
type: feature code contributing to the implementation of a feature and/or user facing functionality

Comments

@kennyjwilli
Copy link

Is your feature request related to a problem? Please describe.

Some build tools require a particular version of Java (e.g., Google Closure Compiler). The current version of the build-image requires Java 8 and does not appear customizable. The Google Closure Compiler, for example, requires Java 11, and is therefore incompatible with Netlify (builds will fail due to the mismatched version).

Describe the solution you'd like

Add the ability to specify the Java version required in a manner similar to how it does so for other tools described here.

Describe alternatives you've considered

  1. Install Java every time the CI runs. This is a time consuming operation that would greatly increase our total build times.
  2. As suggested by a Netlify support engineer, we could include the Java version we want to use in our actual code repository, shelling out to that executable instead. This may work (?), but would bloat our repository size until the end of time.

Additional context

Can you submit a pull request?

Not at this time.

@kennyjwilli kennyjwilli added the type: feature code contributing to the implementation of a feature and/or user facing functionality label Jun 15, 2022
@jacobemcken
Copy link

I found this issue when I realized my ClojureScript builds with Shadow-Cljs were failing.

The easiest temporary workaround for me was to downgrade shadow-cljs to version 2.19.6. Version 2.19.7 introduces the dependency to Java 11+ (indirectly through a newer version of the Google Closure Compiler).

jacobemcken added a commit to jacobemcken/html2hiccup that referenced this issue Oct 19, 2022
@jacobemcken
Copy link

I've looked further into this issue, because I wanted to see how hard it would be to create a PR.

DISCLAIMER: I am not Docker or Java or Linux expert, so read the following with that in mind.

According to http://packages.ubuntu.com the Debian (amd64) packages will take up the following space once installed:

Currently, the Docker "build image" takes up 2.12GB (just built it locally).
In my book, that would mean that for every Java version extra installed, the build image size would increase with at least 10%.

It seems all the Java packages contain the following zip file, with the source code for the Java release
It takes up a considerable amount of space on the disk (around 50Mb):
/usr/lib/jvm/java-11-openjdk-amd64/lib/src.zip

Dunno, how important that file is.

Trade offs, trade offs 🤷

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: feature code contributing to the implementation of a feature and/or user facing functionality
Projects
None yet
Development

No branches or pull requests

2 participants