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

Observe ASDF_CONCURRENCY #369

Open
topalovic opened this issue Oct 20, 2023 · 3 comments
Open

Observe ASDF_CONCURRENCY #369

topalovic opened this issue Oct 20, 2023 · 3 comments

Comments

@topalovic
Copy link

topalovic commented Oct 20, 2023

First of all, thank you for all the hard work so far.

I would like to inquire about support for ASDF_CONCURRENCY. Unless I'm missing something, it looks it was added in 77df296, but then got lost during the transition to ruby-build.

Do you think we could reintroduce it by passing the value to ruby-build as MAKE_OPTS? I'm hoping it is as simple as exporting before the build command:

+export MAKE_OPTS="-j $ASDF_CONCURRENCY"
echo "$patches" | "$(ruby_build_path)" ${opts} "$version" "$install_path"
@glyh
Copy link

glyh commented Mar 21, 2024

Hello, I run into this today, does this accept PR or maintained or whatever?

@Stratus3D
Copy link
Member

I'm not sure I'm a fan of asdf managing the concurrency settings. What if a user wants to use different settings Ruby and another setting for another asdf plugin?

In any case a user has to set something, either:

export MAKE_OPTS="-j <cores>"
export ASDF_CONCURENCY="<cores>"

Thoughts?

@topalovic
Copy link
Author

Hey @Stratus3D.

I'm not sure I'm a fan of asdf managing the concurrency settings

The official docs suggest that it should be supported:

https://asdf-vm.com/manage/configuration.html#concurrency

Note: the environment variable ASDF_CONCURRENCY take precedence if set.

If the plugins don't observe it, then there is no point in its existence, I suppose.

What if a user wants to use different settings Ruby and another setting for another asdf plugin?

It should be as simple as you suggest, no?

$ export ASDF_CONCURRENCY=<cores>
$ asdf install ruby

To clarify why I'm asking about this setting. The default options set MAKE_OPTS="-j $(num_cpu_cores)" which makes the recent i9 i13900 CPUs unstable and prone to segfaults. Only after reducing concurrency to -j 16 was I able to compile Ruby using asdf and rbenv.

If major plugins such as asdf-ruby do not intend to support ASDF_CONCURRENCY, perhaps it should be removed from the official docs.

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

3 participants