Repository navigation
Set up haxelib and the test libraries in agent-setup.sh - #13131
Merged
Merged
Conversation
Agents in fresh containers could build the compiler but not run the unit tests, because haxelib and utest were missing. agent-setup.sh now also builds haxelib, links haxe and haxelib into /usr/local/bin (-lib runs haxelib from PATH, which runs haxe from PATH), sets up a haxelib repository and installs the libraries the tests use, bootstrapping hxcpp. Re-runs skip what is already installed; --no-haxelib skips it. The opam block now goes at the top of ~/.bashrc and ~/.profile: the default Ubuntu ~/.bashrc returns early in non-interactive shells, so the appended block never reached the shells agents run commands in. A block appended by the previous version is moved. The Copilot setup workflow now relies on the script for this instead of duplicating the steps. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Va4FXD77Wkx2gP2orXUPv1
Member
Author
|
This failure doesn't come from this PR. Development's own CI run on the base commit 234c1a6 (run 41638638166) fails the same way in the same job, and that is the only failing job in that run. This PR only changes The assertion sorts the two Generated by Claude Code |
…rectory The haxelib phase used ln -sf, which silently replaced whatever was at /usr/local/bin/haxe and /usr/local/bin/haxelib, including a real Haxe installation on a developer's machine. It now only creates the links where nothing exists yet or replaces links into a Haxe checkout (another worktree or an earlier run, which it logs), and otherwise warns. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Va4FXDYunkfcakJ5BFq4hq
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Agents in fresh containers could build the compiler with
extra/agent-setup.sh, but they couldn't run the unit tests: haxelib wasn't built and utest wasn't installed, so-lib utestfailed. The old Copilot workflow did these steps itself; this PR moves them into the script so every agent environment gets them.Changes
extra/agent-setup.shgets a haxelib phase. It's on by default;--no-haxelibskips it, and so does--no-build.git submodule update --init --recursiveandmake haxelib. Neko comes from the apt packages the script already installs (neko neko-dev).haxeandhaxelibinto/usr/local/bin, or$HAXELIB_BIN_DIRif set. Both have to be on PATH: the compiler runshaxelibfrom PATH for-lib(src/compiler/highLevel.ml), andhaxelib pathin turn runshaxefrom PATH. Without thehaxelink it fails with "Cannot get haxe version".haxelib setup ~/haxelib(or$HAXELIB_REPO) if no repository is configured yet.hxcpp.nexists.The opam block now goes at the top of
~/.bashrcand~/.profile. Ubuntu's default~/.bashrcreturns early in non-interactive shells ([ -z "$PS1" ] && return), so the block the script appended at the end never reached the shells agents run commands in, andduneoropamweren't found. If an older version of the script appended the block, re-running moves it to the top.copilot-setup-steps.ymlnow callsagent-setup.sh --no-apt --no-profileinstead of repeating the build and haxelib steps, so the library list lives only in the script. It keeps thesetup-nekoaction. It drops theSTATICLINK=1build,make package_unixand thelddchecks.AGENTS.mdis updated to match.Testing
Done in a Claude Code cloud container (Ubuntu, running as root), with the script run against a temporary
HOME:PATHlimited to the bin dir plus/usr/bin:/bin,haxe --cwd tests/unit compile-macro.hxmlpasses:ALL TESTS OK..bashrc/.profile(block appended at the end) leaves exactly one block at the top and doesn't change the rest of the file.bash -c 'source ~/.bashrc'with noPS1set picks upOPAMROOT,duneandhaxelib.sudopath is exercised only by the Copilot Setup Steps run on this branch, which hadn't finished when this PR was opened.Generated by Claude Code