Skip to content

fix: refactor for running subproject commands - #1030

Merged
david-christiansen merged 16 commits into
mainfrom
run-elan-command
Oct 29, 2026
Merged

david-christiansen merged 16 commits into
mainfrom
run-elan-command

Conversation

@robsimmons

@robsimmons robsimmons commented Oct 13, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #1027 in the context of a larger refactor, which consolidates the various elan --install <toolchain> <cmd> invocations that had gotten copy-pasted in several different places (and had begun to drift) into a single set of helper functions.

I have some uncertainty about which environment variables were intentionally reset in different ways where. This PR is maximalist about which environment variables are cleared, except for ELAN_HOME and ELAN, which didn't seem correct (and could mess up a Workbench-style installation). Those were introduced in #404 without much commentary.

Restores the test that was disabled in #1031.

@robsimmons

This comment was marked as resolved.

@robsimmons
robsimmons changed the base branch from main to comment-out-tests October 13, 2026 17:37
Base automatically changed from comment-out-tests to main October 13, 2026 18:33
undo resets for ELAN and ELAN_HOME, special-case LAKE_RESTORE_ARTIFACTS, create an EnvOverride type, and allow the user to pick where the noisier error form ends up
@robsimmons robsimmons changed the title fix: refactor running subproject commands, always build needed modules fix: refactor for running subproject commands Oct 15, 2026
Comment thread src/verso-util/VersoUtil/Elan.lean Resolved
Comment thread src/verso-util/VersoUtil/Elan.lean Resolved
Comment thread src/verso-util/VersoUtil/Elan.lean Resolved
Comment thread src/verso-util/VersoUtil/Elan.lean Resolved
Comment thread src/verso-util/VersoUtil/Elan.lean Resolved
Comment thread src/verso-util/VersoUtil/Elan.lean Resolved
Comment thread src/verso-util/VersoUtil/Elan.lean Resolved
Comment thread src/verso-util/VersoUtil/Elan.lean Resolved
Comment thread src/verso-util/VersoUtil/Elan.lean Outdated
$ elan run --install <toolchain> foo bar
```

The function manipulates environment variables (see {name}`getSpawnArgsForToolchain`.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think it's better to describe here what it's doing, because "see" references are difficult to follow from hovers.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

feels like it needs an undesirable copy-paste of docstring, but I did that in 3318f24

Comment thread src/verso-util/VersoUtil/Elan.lean Resolved
Comment thread src/verso-util/VersoUtil/Elan.lean Resolved
@david-christiansen

Copy link
Copy Markdown
Collaborator

This is definitely the right way to go.

I don't really see why we need the EnvOverride type, vs following the underlying convention of absence vs presence in an array of pairs, and there's a few issues with docstrings. Otherwise, great!

@david-christiansen
david-christiansen added this pull request to the merge queue Oct 29, 2026
Merged via the queue into main with commit 112613e Oct 29, 2026
13 checks passed
@david-christiansen
david-christiansen deleted the run-elan-command branch October 29, 2026 11:01
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.

tracking: loadExampleModule does not compile the content

2 participants