Skip to content

Conversation

@elegios
Copy link
Contributor

@elegios elegios commented Oct 9, 2025

This change makes the MCORE_LIBS environment variable behave a touch more like similar variables for other languages (or PATH): earlier entries are prioritized over later ones. Previously the behavior was the opposite.

This is relevant for the self-contained version of TreePPL (see treeppl/treeppl-python#9), which adds its own versions of the various libraries to MCORE_LIBS before starting. Potential options for how to get the desired behavior there include:

  • Look at the MCORE_LIBS in the users environment, remove entries for stdlib, coreppl, and treeppl, then add the correct ones. This removes duplicates, but is fiddly to get right in bash.
  • Add entries to the end of the environment variable. This is inconsistent with other similar variables, which feels like a potential footgun.
  • Add entries to the beginning of the environment variable, and merge this PR.

I would prefer the last option (hence this PR), since it's the most consistent with the rest of the world, and it shouldn't affect any normal setups.

@david-broman david-broman merged commit dc1b0e1 into miking-lang:develop Oct 18, 2025
1 of 2 checks passed
@elegios elegios deleted the mcore-libs-priority branch November 11, 2025 11:58
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

Successfully merging this pull request may close these issues.

2 participants