"https://api.adoptium.net/v3/assets/latest/"
"https://github.com/adoptium/"
"@echo off\nrem flixw cmd.exe trampoline -- GENERATED; DO NOT EDIT. `flixw install` writes it,\nrem `flixw doctor --fix` restores it, and `flixw validate` compares it byte for\nrem byte. To change it, edit the CMD text block in flixw.java; src/flixw.cmd in\nrem that repository is only the checked-in copy, and tests/lint.sh fails if the two\nrem disagree. Finds an initial java, prefers the compiled stage 0 in the user\nrem cache, else launches the source.\nsetlocal enabledelayedexpansion\nset \"ROOT=%~dp0\"\nset \"SRC=%ROOT%.flixw\\flixw.java\"\n\nrem The cache is resolved first: a JDK flixw installed earlier lives in it, and is\nrem the last thing worth trying when nothing else answers.\nif defined FLIX_CACHE_HOME ( set \"CACHE=%FLIX_CACHE_HOME%\" ) else (\n set \"CACHE=%LOCALAPPDATA%\\flixw\" )\n\nrem CHOSEN marks an explicitly named JDK: those are obeyed as given, failing\nrem included, rather than replaced by one the caller did not ask for.\nset \"CHOSEN=1\"\nif defined FLIX_JAVA_HOME ( set \"JAVA0=%FLIX_JAVA_HOME%\\bin\\java.exe\" ) else (\nif defined JAVA_HOME ( set \"JAVA0=%JAVA_HOME%\\bin\\java.exe\" ) else (\nset \"CHOSEN=\"\nfor %%I in (java.exe) do set \"JAVA0=%%~$PATH:I\" ) )\nrem Its path is read from a file rather than guessed: vendors nest differently.\nrem It names something this script will execute, so it may only name something\nrem inside the directory flixw unpacks into.\nrem The marker is cache-controlled text naming something this script will execute,\nrem so it is never echoed, called, or otherwise handed back to the parser: cmd\nrem metacharacters in it would run before anything could validate the path. The\nrem containment test uses delayed expansion alone -- strip the expected prefix,\nrem then require the original to be exactly prefix plus remainder, which is a\nrem starts-with test that never re-parses the value.\nrem The JDK stage 0 resolved for this project last time -- the one that satisfies\nrem its java pin. Starting on it avoids the relaunch stage 0 would otherwise need.\nrem Machine-specific and git-ignored; writable only by someone who could edit this\nrem file anyway, so it adds no trust boundary.\nset \"NOTED=\"\nif not defined CHOSEN if exist \"%ROOT%.flixw\\local\\java\" (\n for /f \"usebackq delims=\" %%J in (\"%ROOT%.flixw\\local\\java\") do (\n if not defined NOTED set \"NOTED=%%J\" ) )\nrem Shape first, and by substring arithmetic rather than by echoing the value:\nrem stage 0 writes a normalized path ending in bin\\java.exe, so anything else is\nrem not a note this wrapper left.\nif defined NOTED (\n set \"TAIL=!NOTED:bin\\java.exe=!\"\n if \"!TAIL!\"==\"!NOTED!\" set \"NOTED=\"\n)\nif defined NOTED if not \"!NOTED!\"==\"!TAIL!bin\\java.exe\" set \"NOTED=\"\nif defined NOTED if not \"!NOTED!\"==\"!NOTED:..=!\" set \"NOTED=\"\nif defined NOTED if not exist \"!NOTED!\" set \"NOTED=\"\nif defined NOTED set \"JAVA0=!NOTED!\"\n\nset \"MINE=\"\nif exist \"%CACHE%\\jdks\\default\" (\n for /f \"usebackq delims=\" %%J in (\"%CACHE%\\jdks\\default\") do (\n if not defined MINE set \"MINE=%%J\" ) )\nif defined MINE (\n set \"TAIL=!MINE:%CACHE%\\jdks\\=!\"\n if not \"!MINE!\"==\"%CACHE%\\jdks\\!TAIL!\" set \"MINE=\"\n)\nrem A starts-with test does not say \"inside\": %CACHE%\\jdks\\..\\..\\evil.exe passes one.\nrem Any .. at all is refused rather than resolved, since resolving it here would mean\nrem handing cache-controlled text back to the parser.\nif defined MINE if not \"!MINE!\"==\"!MINE:..=!\" set \"MINE=\"\nif defined MINE if not exist \"!MINE!\" set \"MINE=\"\nif not defined JAVA0 if defined MINE set \"JAVA0=!MINE!\"\nif not defined JAVA0 (\n echo FLIXW003: no java executable found. Flix needs Java 21+. 1>&2\n echo Install a JDK -- Eclipse Temurin is the usual choice: 1>&2\n echo winget install EclipseAdoptium.Temurin.21.JDK 1>&2\n echo https://adoptium.net/temurin/releases/?version=21 1>&2\n echo Then set JAVA_HOME, or put its bin directory on PATH. 1>&2\n echo flixw cannot fetch this first one: it is a Java program 1>&2\n echo itself, and there is no Java here to run it. Once any Java 16 1>&2\n echo or newer is reachable, flixw.cmd wrapper --install-jdk fetches 1>&2\n echo a verified Temurin 21 into the flixw cache. 1>&2\n exit /b 127 )\nif not exist \"%JAVA0%\" (\n echo FLIXW003: %JAVA0% not found. 1>&2\n exit /b 127 )\nif not exist \"%SRC%\" (\n echo FLIXW009: missing %SRC% 1>&2\n exit /b 88 )\n\nrem Feature version of the selected java, from the release file of its own JDK.\nrem Only used to decide whether the compiled class is loadable: a JVM below the\nrem floor cannot load it and exec leaves no way back. Unknown changes nothing.\nset \"JHOME=%JAVA0:\\bin\\java.exe=%\"\nset \"JFEATURE=\"\nif exist \"%JHOME%\\release\" (\n for /f \"tokens=2 delims==\" %%v in (\'findstr /b /c:\"JAVA_VERSION=\" \"%JHOME%\\release\" 2^>nul\') do (\n for /f \"tokens=1 delims=.-\" %%w in (\"%%~v\") do set \"JFEATURE=%%~w\" ) )\nrem Unknown is not good enough: a java that is a shim script rather than a JDK\nrem layout has no release file, and running the class blind fails on class file\nrem version with no way back. Default to the source path; earn the fast one.\nrem A version manager\'s java.exe is a shim with no JDK layout around it, so there is\nrem no release file and the version stays unknown. Below 15 that java cannot compile\nrem stage 0 either, so the user would see a javac error rather than FLIXW003 or the\nrem JDK flixw installed for this case. Ask the JVM once, and only when there is a\nrem recorded JDK to switch to, so ordinary runs pay nothing.\nif not defined CHOSEN if not defined JFEATURE if defined MINE (\n for /f \"tokens=3\" %%v in (\'cmd /c \"\"%JAVA0%\" -version\" 2^>^&1\') do (\n if not defined JFEATURE (\n for /f \"tokens=1 delims=.-_\" %%w in (\"%%~v\") do set \"JFEATURE=%%~w\" ) ) )\nrem A java below the floor is worse than none: it cannot load the compiled class\nrem and, far enough below, cannot compile stage 0 either. Prefer a recorded JDK --\nrem but never over an explicitly named one, which must fail loudly instead.\nif not defined CHOSEN if defined JFEATURE if !JFEATURE! LSS 21 if defined MINE (\n set \"JAVA0=!MINE!\"\n set \"JFEATURE=\"\n for %%H in (\"!MINE!\") do set \"JHOME=%%~dpH\"\n if exist \"!JHOME!..\\release\" (\n for /f \"tokens=2 delims==\" %%v in (\'findstr /b /c:\"JAVA_VERSION=\" \"!JHOME!..\\release\" 2^>nul\') do (\n for /f \"tokens=1 delims=.-\" %%w in (\"%%~v\") do set \"JFEATURE=%%~w\" ) ) )\nset \"SLOWPATH=1\"\nif defined JFEATURE if !JFEATURE! GEQ 21 set \"SLOWPATH=\"\n\nset \"H=\"\nfor /f \"skip=1 delims=\" %%L in (\'certutil -hashfile \"%SRC%\" SHA256 2^>nul\') do (\n if not defined H set \"H=%%L\" )\nif defined H set \"H=!H: =!\"\nrem Everything that needed delayed expansion is now in ordinary variables, so it\nrem is switched off before the launch. With it on, `%*` is rescanned for !...!\nrem *after* substitution, and an argument containing an exclamation mark loses\nrem part of itself before java is even started: `flixw run \"a!b\"` arrives as `ab`.\nrem The two commands are also kept out of parentheses, because a `)` inside a\nrem quoted argument can close a block that a `%*` sits in.\nset \"CP=!CACHE!\\stage0\\!H!\"\nset \"FAST=\"\nif not defined SLOWPATH if defined H if exist \"!CP!\\flixw.class\" set \"FAST=1\"\nif defined FAST set \"FLIXW_SOURCE=%SRC%\"\nsetlocal disabledelayedexpansion\nif defined FAST goto :flixw_fast\n\"%JAVA0%\" \"%SRC%\" %*\nexit /b %ERRORLEVEL%\n:flixw_fast\n\"%JAVA0%\" -cp \"%CP%\" flixw %*\nexit /b %ERRORLEVEL%\n"
"# flixw TAB completion for bash -- GENERATED by `flixw wrapper --completion bash`.\n#\n# ./flixw wrapper --completion bash > ~/.local/share/bash-completion/completions/flixw\n#\n# Candidates are read at TAB time from <project>/.flixw/local/verbs, the note stage 0\n# leaves after it resolves a compiler, so they follow the pin and this file does not\n# have to be regenerated after `pin`. Nothing here starts a JVM: a stage 0 launch\n# plus the digest re-hash flixw does on every run would cost more than typing the verb.\n\n_flixw_root() {\n # The project is wherever the wrapper being completed lives, not the working\n # directory: `../other/flixw` is a different project\'s verb set, and completing it\n # from this one would be confidently wrong.\n local d\n d=$(dirname -- \"$1\" 2>/dev/null) || d=.\n [ -n \"$d\" ] || d=.\n printf \'%s\' \"$d\"\n}\n\n_flixw() {\n local cur root note words compl script fn saved0 saved_line\n cur=${COMP_WORDS[COMP_CWORD]}\n root=$(_flixw_root \"${COMP_WORDS[0]}\")\n note=$root/.flixw/local/verbs\n\n if [ \"$COMP_CWORD\" -eq 1 ]; then\n # No note yet means this project has never resolved a compiler. The baked-in\n # list is this wrapper release\'s own view -- stale in the same harmless way the\n # built-in verb table in stage 0 is, and better than completing nothing.\n if [ -r \"$note\" ]; then words=$(cat -- \"$note\" 2>/dev/null)\n else words=\"@VERBS@\"; fi\n # shellcheck disable=SC2207\n COMPREPLY=( $(compgen -W \"$words\" -- \"$cur\") )\n return 0\n fi\n\n # Past the verb, the compiler owns the arguments. A picocli-based Flix ships a\n # completer for them and stage 0 caches it; stock Flix is scopt and ships none, so\n # the note is absent and `-o default` falls through to filename completion.\n compl=$root/.flixw/local/completion\n [ -r \"$compl\" ] || return 0\n script=$(cat -- \"$compl\" 2>/dev/null)\n [ -n \"$script\" ] && [ -r \"$script\" ] || return 0\n\n # The registration line, which is the only part of a generated completer that is\n # not the generator\'s private business: any bash completion script must end with\n # one for the shell to use it at all. Reading the function name from there rather\n # than assuming picocli\'s `_complete_<name>` spelling means a rename upstream costs\n # filename completion for one release instead of a broken completer.\n fn=$(sed -n \'s/^complete .*-F \\([A-Za-z_][A-Za-z0-9_]*\\).*/\\1/p\' \"$script\" 2>/dev/null | head -1)\n [ -n \"$fn\" ] || return 0\n if ! declare -F \"$fn\" >/dev/null 2>&1; then\n # Sourcing also runs the script\'s own `complete` call, which registers it for the\n # compiler\'s name. That is harmless -- it is a name this shell would otherwise\n # have no completion for -- and it is why this happens once per shell, not per TAB.\n # shellcheck disable=SC1090\n . \"$script\" >/dev/null 2>&1 || return 0\n declare -F \"$fn\" >/dev/null 2>&1 || return 0\n fi\n\n # The generated completer keys off argv[0] being the compiler\'s own name, which\n # here is `./flixw`. Swap it for the length of the call and put it back: COMP_WORDS\n # belongs to the shell, not to us.\n saved0=${COMP_WORDS[0]}; saved_line=$COMP_LINE\n COMP_WORDS[0]=flix\n COMP_LINE=\"flix ${COMP_LINE#* }\"\n \"$fn\"\n COMP_WORDS[0]=$saved0; COMP_LINE=$saved_line\n return 0\n}\n\n# Both spellings: nobody puts the wrapper on PATH, so `./flixw` is the form that\n# matters, and bash matches the command word as typed rather than resolving it.\ncomplete -F _flixw -o default flixw ./flixw\n"
"# flixw TAB completion for fish -- GENERATED by `flixw wrapper --completion fish`.\n#\n# ./flixw wrapper --completion fish > ~/.config/fish/completions/flixw.fish\n#\n# Candidates are read at TAB time from <project>/.flixw/local/verbs, the note stage 0\n# leaves after it resolves a compiler, so they follow the pin and this file does not\n# have to be regenerated after `pin`. Nothing here starts a JVM.\n#\n# Verbs only. picocli generates bash and zsh completers and no fish one, and fish\n# cannot load a bash completion script, so past the verb fish\'s own file completion\n# takes over -- which is what the arguments to `run`, `check` and `build` mostly are.\n\nfunction __flixw_verbs --description \'the verbs the project being completed dispatches\'\n set -l tokens (commandline -opc)\n test (count $tokens) -gt 0; or return\n # The project is wherever the wrapper being completed lives, not the working\n # directory: `../other/flixw` is a different project\'s verb set. Done with\n # builtins rather than dirname, so a keypress costs no process at all.\n set -l root .\n if string match -q \'*/*\' -- $tokens[1]\n set root (string replace -r \'/[^/]*$\' \'\' -- $tokens[1])\n test -n \"$root\"; or set root /\n end\n set -l note $root/.flixw/local/verbs\n if test -r $note\n cat -- $note\n else\n # No note yet means this project has never resolved a compiler. The baked-in\n # list is this wrapper release\'s own view -- stale in the same harmless way\n # the built-in verb table in stage 0 is, and better than completing nothing.\n printf \'%s\\n\' @VERBS@\n end\nend\n\n# fish matches on the command\'s base name, so this one registration covers `flixw`,\n# `./flixw` and an absolute path alike -- unlike bash, which matches the word as typed.\ncomplete -c flixw -f -n __fish_is_first_arg -a \'(__flixw_verbs)\'\ncomplete -c flixw -n \'not __fish_is_first_arg\' -F\n"
"completion"
"# flixw TAB completion for PowerShell -- GENERATED by\n# `flixw wrapper --completion pwsh`.\n#\n# ./flixw wrapper --completion pwsh >> $PROFILE\n#\n# Candidates are read at TAB time from <project>\\.flixw\\local\\verbs, the note stage 0\n# leaves after it resolves a compiler, so they follow the pin and this file does not\n# have to be regenerated after `pin`. Nothing here starts a JVM.\n#\n# This registers against the existing flixw.cmd trampoline; PowerShell completes\n# native commands including batch files, so nothing has to move to a .ps1 -- and the\n# trampoline could not move anyway, since a .ps1 is not invokable as a bare command\n# from cmd.exe or from a build tool, and the default execution policy blocks a\n# downloaded one. cmd.exe itself has no per-command completion mechanism at all, so\n# it gets nothing here and that is an absence in cmd, not a gap in this script.\n#\n# Verbs only. picocli generates bash and zsh completers and no PowerShell one, so\n# past the verb there is nothing to delegate to and PowerShell\'s own file completion\n# takes over.\nRegister-ArgumentCompleter -Native -CommandName flixw, flixw.cmd -ScriptBlock {\n param($wordToComplete, $commandAst, $cursorPosition)\n\n $elements = $commandAst.CommandElements\n # The verb position only; past it the compiler owns the arguments.\n if ($elements.Count -gt 2) { return }\n if ($elements.Count -eq 2 -and [string]::IsNullOrEmpty($wordToComplete)) { return }\n\n # The project is wherever the wrapper being completed lives, not the working\n # directory: another project\'s wrapper has another project\'s verb set.\n $root = Split-Path -Parent $elements[0].ToString()\n if ([string]::IsNullOrEmpty($root)) { $root = \'.\' }\n $note = Join-Path $root \'.flixw/local/verbs\'\n\n # No note yet means no compiler has been resolved here; the baked-in list is this\n # release\'s own view, stale in the same harmless way stage 0\'s table is.\n $verbs = if (Test-Path -LiteralPath $note) { Get-Content -LiteralPath $note }\n else { @(@VERBS@) }\n\n $verbs | Where-Object { $_ -and $_.StartsWith($wordToComplete) } | ForEach-Object {\n [System.Management.Automation.CompletionResult]::new(\n $_, $_, \'ParameterValue\', $_)\n }\n}\n"
"#compdef flixw ./flixw\n# flixw TAB completion for zsh -- GENERATED by `flixw wrapper --completion zsh`.\n#\n# ./flixw wrapper --completion zsh > \"${fpath[1]}/_flixw\"\n#\n# Candidates are read at TAB time from <project>/.flixw/local/verbs, the note stage 0\n# leaves after it resolves a compiler, so they follow the pin and this file does not\n# have to be regenerated after `pin`. Nothing here starts a JVM.\n\n_flixw() {\n # The project is wherever the wrapper being completed lives, not the working\n # directory; :h on a bare name yields `.`, which is the same answer.\n local root=${words[1]:h}\n [[ -n $root ]] || root=.\n local note=$root/.flixw/local/verbs\n\n if (( CURRENT == 2 )); then\n local -a verbs\n # No note yet means no compiler has been resolved here; the baked-in list is this\n # release\'s own view, stale in the same harmless way stage 0\'s table is.\n if [[ -r $note ]]; then verbs=( ${(f)\"$(<$note)\"} )\n else verbs=( @VERBS@ ); fi\n _describe -t flixw-verbs \'flixw verb\' verbs\n return\n fi\n\n # Past the verb the compiler owns the arguments. picocli generates bash and zsh\n # completers as one bash script, which is not loadable here without bashcompinit\n # and a compatibility shim; rather than half-load it, fall through to files, which\n # is what the arguments to `run`, `check` and `build` mostly are.\n _files\n}\n\n_flixw \"$@\"\n"
"# .envrc.example -- copy to .envrc, then run: direnv allow\n#\n# Requires direnv (https://direnv.net); flixw itself never reads this file.\n# direnv exports these into your shell before ./flixw ever starts, which is\n# also why it reaches a terminal and not an editor-spawned `flixw lsp`.\n#\n# One-time setup per machine. direnv does nothing until its hook is in your\n# shell\'s startup file, and until then an .envrc is an inert text file:\n#\n# bash in ~/.bashrc: eval \"$(direnv hook bash)\"\n# zsh in ~/.zshrc: eval \"$(direnv hook zsh)\"\n# fish in ~/.config/fish/config.fish: direnv hook fish | source\n#\n# This file is bash whatever your own shell is: direnv evaluates it with bash\n# and exports the difference. So fish users still write `export FOO=bar` here\n# -- `set -x FOO bar` is a syntax error in this file.\n#\n# Everything here is optional and every line is commented out. flixw works with\n# none of it set; the full table is in docs/CONTRACT.md.\n\n# ---- which JDK runs the compiler ------------------------------------------\n# Prefer pinning it for everyone in .flixw/lock.toml:\n# ./flixw pin <version> --java 21\n# That is committed and reproducible. Use this only when *your* machine keeps\n# that JDK somewhere the search would not find. An invalid value is fatal, on\n# purpose: a silently ignored JDK selection is worse than a stopped build.\n#\n# export FLIX_JAVA_HOME=\"$HOME/.sdkman/candidates/java/21.0.5-tem\"\n\n# ---- running a compiler flixw did not download ----------------------------\n# The jar is NOT digest-verified, every such run says so on stderr, and those\n# runs are not stock-compatibility evidence. A valid lock is still required:\n# .flixw/lock.toml is read, and drift checked, before the override is.\n#\n# export FLIX_JAR=\"$PWD/../flix/build/libs/flix.jar\"\n\n# ---- where downloads land -------------------------------------------------\n# A cache inside the project, rather than the shared one under your home\n# directory. Useful for a throwaway container, or to keep one project\'s\n# compilers off a small home volume; the compiler is then downloaded once\n# per project instead of once per machine.\n#\n# Put it under local/ if you put it here at all -- that is the one path\n# .flixw/.gitignore already keeps out of git, and a cache holds a\n# ~33MB jar that must never reach a commit.\n#\n# export FLIX_CACHE_HOME=\"$PWD/.flixw/local/cache\"\n\n# ---- fetching through a mirror --------------------------------------------\n# Rewrites the download base only. The pinned digest is unchanged and still\n# verified, so a mirror serving different bytes fails rather than substitutes.\n# Must be https.\n#\n# export FLIX_DIST_URL=\"https://artifacts.example.com/flix\"\n# export HTTPS_PROXY=\"http://proxy.example.com:3128\"\n# export NO_PROXY=\"localhost,127.0.0.1,.example.com\"\n\n# ---- options for the compiler JVM -----------------------------------------\n# For a project big enough to need more heap than the default. These go to the\n# compiler\'s JVM, not to flixw\'s; a deny-list rejects the ones that would\n# change what code the JVM loads or runs (-cp, -javaagent:, @argfiles).\n#\n# export FLIX_JVM_OPTS=\"-Xmx4g\"\n\n# ---- while debugging flixw itself -----------------------------------------\n# Per-phase timings on stderr. Transient by nature -- if this is still on in a\n# month, that is the sign it belongs in your shell for one command instead.\n#\n# export FLIXW_TRACE=1\n\n# ---- keeping this file honest ---------------------------------------------\n# Anything machine-specific belongs in an ignored file, not in the one you\n# might be tempted to commit:\n#\n# source_env_if_exists .envrc.local\n#\n# flixw does not edit your .gitignore. Add these yourself if you use them:\n# .envrc\n# .envrc.local\n"
"https://github.com/wstein/flixw/releases/latest/download/"
3
static final int
1048576
"[0-9]+(\\.[0-9]+)*"
"# Generated by flixw. Do not edit by hand; `flixw doctor --fix` rewrites it.\n# It keeps .flixw/local/ -- machine-specific notes -- out of git.\nlocal/\n"
"https://wstein.github.io/flixw/schema/lock-v1.schema.json"
"v1"
static final int
2097152
static final int
21
"https://wstein.github.io/flixw/"
"usage: ./flixw pin [<owner>/<repo>] [<version>] [--java <version>]\n or: ./flixw pin --refresh (rewrite the lock in this release\'s shape)"
"[A-Za-z0-9._-]{1,64}/[A-Za-z0-9._-]{1,100}"
"#!/bin/sh\n# flixw shim -- GENERATED; DO NOT EDIT. `flixw install` writes this file,\n# `flixw doctor --fix` restores it, and `flixw validate` compares it byte for byte,\n# so an edit here is first reported and then overwritten. It is byte-identical\n# across every project on a given flixw release. To change it, edit the SHIM text\n# block in flixw.java -- src/flixw in that repository is only the checked-in copy,\n# and tests/lint.sh fails if the two disagree.\n# Finds an initial java, prefers the compiled stage 0, else launches the source.\nset -e\nself=$0\nwhile [ -L \"$self\" ]; do\n link=$(readlink \"$self\")\n case $link in /*) self=$link ;; *) self=$(dirname \"$self\")/$link ;; esac\ndone\n# CDPATH is cleared for this command only: a set CDPATH makes `cd` resolve\n# elsewhere and echo the result. shellcheck reads that as a typo (SC1007).\n# shellcheck disable=SC1007\nroot=$(CDPATH= cd -- \"$(dirname -- \"$self\")\" && pwd -P)\nsrc=$root/.flixw/flixw.java\n\n# The cache is resolved before the java search, because a JDK flixw installed\n# earlier lives in it and is the last thing worth trying.\nif [ -n \"${FLIX_CACHE_HOME:-}\" ]; then cache=$FLIX_CACHE_HOME\nelse\n case $(uname -s) in\n Darwin) cache=$HOME/Library/Caches/flixw ;;\n *) cache=${XDG_CACHE_HOME:-$HOME/.cache}/flixw ;;\n esac\nfi\n\n# `chosen` marks an explicitly named JDK. Those are obeyed exactly as given, right\n# down to failing: stage 0\'s contract is that an explicit setting fails loudly\n# rather than being quietly replaced by a JVM the caller did not ask for.\nchosen=yes\nif [ -n \"${FLIX_JAVA_HOME:-}\" ]; then java0=$FLIX_JAVA_HOME/bin/java\nelif [ -n \"${JAVA_HOME:-}\" ]; then java0=$JAVA_HOME/bin/java\nelse java0=$(command -v java 2>/dev/null || true); chosen=no; fi\n\n# The JDK flixw installed, if there is one. Its path is read from a file rather than\n# guessed, because every vendor nests differently -- and the marker names something\n# this script will execute, so it may only name something inside the directory flixw\n# unpacks into. A prefix test alone does not say that: `$cache/jdks/../../bin/java`\n# passes one and is not inside anything. Containment is a guardrail rather than the\n# security boundary, which is who can write the cache at all -- `doctor` checks that\n# -- but a guardrail that a plain `..` walks through is not one.\ncached_jdk() {\n [ -r \"$cache/jdks/default\" ] || return 0\n cj=$(cat \"$cache/jdks/default\" 2>/dev/null || true)\n case $cj in\n *\"/../\"* | */.. ) return 0 ;;\n \"$cache/jdks/\"* ) ;;\n * ) return 0 ;;\n esac\n [ -x \"$cj\" ] || return 0\n printf \'%s\\n\' \"$cj\"\n}\n\n# The JDK stage 0 resolved for *this project* last time, which is the one that\n# satisfies its java pin. Starting on it is the whole point: otherwise the shim\n# starts whatever java is first on PATH and stage 0 has to spend a second process\n# correcting it, on every command. Machine-specific, so it is not committed --\n# .flixw/.gitignore keeps it out. It names something this script executes, and\n# that is not a new trust boundary: anyone able to write .flixw/local/ can edit\n# this file instead, which is easier and does more.\nif [ \"$chosen\" = no ] && [ -r \"$root/.flixw/local/java\" ]; then\n noted=$(cat \"$root/.flixw/local/java\" 2>/dev/null || true)\n # Shape first: stage 0 writes a normalized absolute path ending in bin/java, so\n # anything else is not a note this wrapper left. It is a cheap sanity check\n # rather than a security boundary -- whoever can write here can edit this file\n # -- but a note is not the place to discover you are running something else.\n case $noted in\n *\"/../\"* | */.. ) noted= ;;\n /*/bin/java ) ;;\n * ) noted= ;;\n esac\n if [ -n \"$noted\" ] && [ -x \"$noted\" ]; then java0=$noted; fi\nfi\n\n# Nothing on PATH: fall back to that JDK.\n[ -n \"$java0\" ] || java0=$(cached_jdk)\n\nif [ -z \"$java0\" ]; then\n echo \"FLIXW003: no java executable found. Flix needs Java 21+.\" >&2\n echo \" Install a JDK -- Eclipse Temurin is the usual choice:\" >&2\n case $(uname -s) in\n Darwin) echo \" brew install temurin@21\" >&2 ;;\n *) echo \" apt install temurin-21-jdk (or your package manager)\" >&2 ;;\n esac\n echo \" https://adoptium.net/temurin/releases/?version=21\" >&2\n echo \" Then set JAVA_HOME, or put its bin directory on PATH.\" >&2\n echo \" flixw cannot fetch this first one: it is a Java program itself,\" >&2\n echo \" and there is no Java here to run it. Once any Java 16 or newer is\" >&2\n echo \" reachable, ./flixw wrapper --install-jdk fetches a verified\" >&2\n echo \" Temurin 21 into the flixw cache and leaves the system alone.\" >&2\n exit 127\nfi\nif [ ! -x \"$java0\" ]; then\n echo \"FLIXW003: $java0 is not executable.\" >&2\n exit 126\nfi\nif [ ! -f \"$src\" ]; then\n echo \"FLIXW009: missing $src\" >&2\n exit 88\nfi\n\n# Feature version of the selected java, read from the release file of the JDK it\n# lives in -- the same source stage 0 prefers, and it costs one file read. The\n# shim does not decide anything with this beyond whether the compiled class is\n# loadable; below-floor Java stays stage 0\'s diagnostic to give. A java that does\n# not resolve into a JDK layout leaves this unknown, and unknown changes nothing.\njhome=$java0\nwhile [ -L \"$jhome\" ]; do\n link=$(readlink \"$jhome\")\n case $link in /*) jhome=$link ;; *) jhome=$(dirname \"$jhome\")/$link ;; esac\ndone\njhome=${jhome%/bin/java}\njfeature=\nif [ -r \"$jhome/release\" ]; then\n jfeature=$(sed -n \'s/^JAVA_VERSION=\"\\([0-9][0-9]*\\).*/\\1/p\' \"$jhome/release\" 2>/dev/null)\nfi\n\n# A java below the floor is worse than none: below 15 it cannot even compile stage\n# 0, so nothing flixw knows -- its own installed JDK included -- is ever reached.\n# When one is recorded, prefer it and let stage 0 speak.\n# A version manager\'s `java` is a shim script with no JDK layout around it, so there\n# is no release file and the feature version stays unknown. Ordinarily that is fine --\n# stage 0 asks the JVM itself -- but below 15 the JVM cannot compile stage 0, so the\n# question is never reached and the user gets a javac error instead of FLIXW003, and\n# instead of the JDK flixw installed for precisely this case. Ask the JVM once, and\n# only when there is something better to switch to, so the cost falls on the machines\n# that need it rather than on every run.\nif [ \"$chosen\" = no ] && [ -z \"$jfeature\" ] && [ -n \"$(cached_jdk)\" ]; then\n jfeature=$(\"$java0\" -version 2>&1 \\\n | sed -n \'s/^[A-Za-z ]*version \"\\([0-9][0-9]*\\).*/\\1/p\' | head -1)\nfi\n\nif [ \"$chosen\" = no ] && [ -n \"$jfeature\" ] && [ \"$jfeature\" -lt 21 ]; then\n mine=$(cached_jdk)\n if [ -n \"$mine\" ]; then\n java0=$mine\n jhome=${mine%/bin/java}\n jfeature=\n if [ -r \"$jhome/release\" ]; then\n jfeature=$(sed -n \'s/^JAVA_VERSION=\"\\([0-9][0-9]*\\).*/\\1/p\' \"$jhome/release\" 2>/dev/null)\n fi\n fi\nfi\n\n# Content-keyed compiled stage 0. Versioned interface with stage 0; see README.\nh=\nif command -v shasum >/dev/null 2>&1; then h=$(shasum -a 256 \"$src\" 2>/dev/null | cut -d\' \' -f1)\nelif command -v sha256sum >/dev/null 2>&1; then h=$(sha256sum \"$src\" 2>/dev/null | cut -d\' \' -f1)\nelif command -v openssl >/dev/null 2>&1; then h=$(openssl dgst -sha256 -r \"$src\" 2>/dev/null | cut -d\' \' -f1)\nfi\n# The class is built for the floor, and the version has to be *known* to be at or\n# above it. Unknown used to be treated as fine, which is wrong in the one case it\n# matters: asdf, mise and jenv install `java` as a shim script rather than a\n# symlink into a JDK, so there is no release file to read, and a shim pointing at\n# Java 17 loaded the class and died on class file version. The cost of being\n# careful is that such setups always take the source path.\nif [ -n \"$h\" ] && [ -f \"$cache/stage0/$h/flixw.class\" ] \\\n && [ -n \"$jfeature\" ] && [ \"$jfeature\" -ge 21 ]; then\n FLIXW_SOURCE=$src; export FLIXW_SOURCE\n exec \"$java0\" -cp \"$cache/stage0/$h\" flixw \"$@\"\nfi\nexec \"$java0\" \"$src\" \"$@\"\n"
static final int
16
static final int
26
"flix/flix"
"verbs"
".flixw"
"0.24.1"