Ignore mise and asdf configuration files by bric3 · Pull Request #9108 · DataDog/dd-trace-java · GitHub
Skip to content

Ignore mise and asdf configuration files#9108

Merged
bric3 merged 1 commit into
masterfrom
bdu/ignore-asdf-mise
Jul 8, 2025
Merged

Ignore mise and asdf configuration files#9108
bric3 merged 1 commit into
masterfrom
bdu/ignore-asdf-mise

Conversation

@bric3

@bric3 bric3 commented Jul 4, 2025

Copy link
Copy Markdown
Contributor

What Does This Do

Motivation

Additional Notes

Contributor Checklist

Jira ticket: [PROJ-IDENT]

@bric3 bric3 requested a review from a team as a code owner July 4, 2025 16:10
@bric3 bric3 added tag: no release notes Changes to exclude from release notes comp: tooling Build & Tooling labels Jul 4, 2025
@bric3 bric3 requested a review from amarziali July 4, 2025 16:10
@pr-commenter

pr-commenter Bot commented Jul 4, 2025

Copy link
Copy Markdown

Comment thread .gitignore Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps we could also provide .config/mise.toml in the repo for easier setup? Can it setup JAVA_XX_HOME env vars?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea, I never looked into that.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we start adding custom config tool, we will end up having support for dozen of tools and not many people to maintain it :/

I would rather add support to install JDK from the setup scripts. Windows is already supported.
Linux and MacOS still needed. The tough part is to do it the more generic way without assuming nor requiring some specific tool.

@bric3 bric3 Jul 7, 2025

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

THis is very similar to any other env tool in many other languages.

I would rather add support to install JDK from the setup scripts.

My counterpoint is that setup script don;t manage JDK install well, other tools do that much better. For example the advantage of mise or asdf is they patch the PATH in the shell to the wanted JDK.

Also I wonder if we could leverage Gradle's JDK toolchain resolver (usually the foojay one), which hopefully don't preclude, other tools like mise or sdkman ?

Can it setup JAVA_XX_HOME env vars?

I believe it's possible, however, it won't work in IntelliJ, as IJ captures environment variables produces by your ~/.zshrc. What I do have in mine is

export JAVA_8_HOME=/Users/brice.dutheil/.local/share/mise/installs/java/corretto-8
export JAVA_11_HOME=/Users/brice.dutheil/.local/share/mise/installs/java/corretto-11
export JAVA_17_HOME=/Users/brice.dutheil/.local/share/mise/installs/java/corretto-17
export JAVA_21_HOME=/Users/brice.dutheil/.local/share/mise/installs/java/corretto-21
export JAVA_GRAALVM17_HOME=/Users/brice.dutheil/.local/share/mise/installs/java/graalvm-community-17.0.9

Does are symlinks pointing to the latest installed JDK installed my mise.


FYI the mise configuration doc

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On the point of using .gitignore, is that it will be available for any clone, and thus avoiding accidental commit.

@bric3 bric3 enabled auto-merge (squash) July 7, 2025 07:58
@bric3 bric3 disabled auto-merge July 7, 2025 07:59

@PerfectSlayer PerfectSlayer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May an unpopular opinion but I would rather avoid adding many custom tools to the common ignore list.
If you have some specific file to exclude related to your setup, the .git/info/exclude seems more appropriate.

Comment thread .gitignore Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we start adding custom config tool, we will end up having support for dozen of tools and not many people to maintain it :/

I would rather add support to install JDK from the setup scripts. Windows is already supported.
Linux and MacOS still needed. The tough part is to do it the more generic way without assuming nor requiring some specific tool.

@bric3 bric3 force-pushed the bdu/ignore-asdf-mise branch from 9897ef9 to 14ccb1a Compare July 7, 2025 13:34
@bric3

bric3 commented Jul 8, 2025

Copy link
Copy Markdown
Contributor Author

@bric3 bric3 merged commit 3bc6acd into master Jul 8, 2025
508 checks passed
@bric3 bric3 deleted the bdu/ignore-asdf-mise branch July 8, 2025 10:05
@github-actions github-actions Bot added this to the 1.51.0 milestone Jul 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp: tooling Build & Tooling tag: no release notes Changes to exclude from release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants