pax_global_header00006660000000000000000000000064147177261410014524gustar00rootroot0000000000000052 comment=bc778a882ed5f26c544c4a3c67adc800b3b95936 brew-install-1.12.0.1488/000077500000000000000000000000001471772614100146135ustar00rootroot00000000000000brew-install-1.12.0.1488/.gitattributes000066400000000000000000000002661471772614100175120ustar00rootroot00000000000000* text=auto # Unix Shell Scripts *.sh text eol=lf clj text eol=lf clojure text eol=lf print_version text eol=lf update_version text eol=lf brew-install-1.12.0.1488/.github/000077500000000000000000000000001471772614100161535ustar00rootroot00000000000000brew-install-1.12.0.1488/.github/workflows/000077500000000000000000000000001471772614100202105ustar00rootroot00000000000000brew-install-1.12.0.1488/.github/workflows/check.yml000066400000000000000000000016561471772614100220200ustar00rootroot00000000000000name: Check download via setup-clojure on: workflow_dispatch: inputs: os: description: 'OS to check installation with' required: true default: 'ubuntu-latest' version: description: 'Version to check installation with' required: true default: 'latest' jobs: build: runs-on: ${{ github.event.inputs.os }} steps: - name: Set Github identity run: | git config --global user.name clojure-build git config --global user.email "clojure-build@users.noreply.github.com" - name: Set up Java uses: actions/setup-java@v3 with: java-version: 8 distribution: 'temurin' - name: Set up Clojure uses: DeLaGuardo/setup-clojure@11.0 with: cli: ${{ github.event.inputs.version }} - name: Check downloaded version run: clojure --version - name: Run CLI run: clojure -M -e nil brew-install-1.12.0.1488/.github/workflows/promote.yml000066400000000000000000000036021471772614100224210ustar00rootroot00000000000000name: Promote dev to stable on: [workflow_dispatch] permissions: # Exchange the OIDC token (JWT) for a cloud access token id-token: write # This is required for requesting the JWT contents: write # This is required for actions/checkout jobs: build: runs-on: ubuntu-latest steps: - uses: aws-actions/configure-aws-credentials@v2 with: role-to-assume: arn:aws:iam::173728190221:role/github-CLI-upload aws-region: us-east-2 - name: Check out uses: actions/checkout@v3 - name: Set Github identity run: | git config --global user.name clojure-build git config --global user.email "clojure-build@users.noreply.github.com" - name: Read versions and save for later use run: | source script/read_versions.sh echo "DEVEL_VERSION=$DEVEL_VERSION" >> "$GITHUB_ENV" echo "DEVEL_SHA=$DEVEL_SHA" >> "$GITHUB_ENV" echo "STABLE_VERSION=$STABLE_VERSION" >> "$GITHUB_ENV" echo "STABLE_SHA=$STABLE_SHA" >> "$GITHUB_ENV" - name: Read versions run: | cp devel.properties stable.properties git add stable.properties git commit -m "update stable to $DEVEL_VERSION" git push - name: Publish new stable version run: aws s3 cp --only-show-errors "stable.properties" "$S3_BUCKET/install/stable.properties" env: S3_BUCKET: ${{ secrets.S3_BUCKET }} - name: Mark github release as published and latest run: gh release edit "$DEVEL_VERSION" --prerelease=false --latest env: GH_TOKEN: ${{secrets.GH_TOKEN}} - name: Change brew recipe in tap run: | echo "old $STABLE_VERSION" gh workflow run -R clojure/homebrew-tools promote -r master -f old_version="$STABLE_VERSION" -f old_sha="$STABLE_SHA" -f new_version="$DEVEL_VERSION" -f new_sha="$DEVEL_SHA" env: GH_TOKEN: ${{secrets.GH_TOKEN}} brew-install-1.12.0.1488/.github/workflows/release.yml000066400000000000000000000042521471772614100223560ustar00rootroot00000000000000name: Release dev version on: [workflow_dispatch] permissions: # Exchange the OIDC token (JWT) for a cloud access token id-token: write # This is required for requesting the JWT contents: write # This is required for actions/checkout jobs: build: runs-on: ubuntu-latest steps: - uses: aws-actions/configure-aws-credentials@v2 with: role-to-assume: arn:aws:iam::173728190221:role/github-CLI-upload aws-region: us-east-2 - name: Check out uses: actions/checkout@v3 with: fetch-depth: 0 - name: Set Github identity run: | git config --global user.name clojure-build git config --global user.email "clojure-build@users.noreply.github.com" - name: Set up Java uses: actions/setup-java@v3 with: java-version: 8 distribution: 'temurin' - name: Set up Clojure uses: DeLaGuardo/setup-clojure@9.5 with: cli: 1.11.1.1347 - name: Cache clojure dependencies uses: actions/cache@v3 with: path: | ~/.m2/repository ~/.gitlibs key: cljdeps-${{ hashFiles('deps.edn') }} restore-keys: cljdeps- - name: Calculate version run: | script/update_version echo "VERSION=$(cat VERSION)" >> "$GITHUB_ENV" - name: Package release run: clojure -T:build release - name: Upload release to site run: script/publish.sh env: S3_BUCKET: ${{ secrets.S3_BUCKET }} - name: Tag release run: | git tag -a "$VERSION" -m "$VERSION" git push --tags git push - name: Upload to github release run: gh release create "$VERSION" -p -t "$VERSION" "target/clojure@$VERSION.rb" "target/clojure-tools-$VERSION.tar.gz" "target/clojure-tools-$VERSION.tar.gz.sha256" "target/linux-install.sh" "target/posix-install.sh" "target/clojure-tools.zip" "target/win-install.ps1" "target/clojure-tools.zip.sha256" env: GH_TOKEN: ${{secrets.GH_TOKEN}} - name: Publish versioned brew recipe to tap run: gh workflow run -R clojure/homebrew-tools publish -r master -f "version=$VERSION" env: GH_TOKEN: ${{secrets.GH_TOKEN}} brew-install-1.12.0.1488/.gitignore000066400000000000000000000001611471772614100166010ustar00rootroot00000000000000dependency-reduced-pom.xml target .idea/ clojure-tools.iml .cpcache/ *.iml .nrepl-port .lsp/ .clj-kondo/ .calva/ brew-install-1.12.0.1488/CHANGELOG.md000066400000000000000000000450241471772614100164310ustar00rootroot00000000000000Changelog =========== **Also see [tools.deps changelog](https://github.com/clojure/tools.deps.alpha/blob/master/CHANGELOG.md)** clj has both stable and prerelease versions. Current and former stable build are listed in **bold** and are (or were) available from the default [brew formula](https://github.com/clojure/brew-install/). Other versions can be obtained using versioned formulas only. Prerelease versions: * Next: * Tweak message when -X or -T function namespace not found * Update to latest tools.tools * Update to latest tools.deps **Current stable version:** * **1.12.0.1479** * **Default to Clojure 1.12.0** * **Update to tools.deps 0.21.1449 and tools.deps.cli** Older versions (previous stable builds in bold): * **1.11.4.1474** * **Default to Clojure 1.11.4** * **Update to tools.deps 0.20.1440** * **1.11.3.1463** * **Update list of :deps programs in help** * **Update to latest tools.deps.cli, tools.deps, and tools.build** * **1.11.3.1456 on Apr 24, 2024** * **Update to latest tools.deps and tools.deps.cli** * 1.11.3.1452 on Apr 24, 2024 * Update to Clojure 1.11.3 as default * **1.11.2.1446 on Mar 8, 2024** * **Update to tools.deps 0.19.1417** * **1.11.2.1441 on Mar 8, 2024** * **Update to tools.tools 0.3.3** * **Update to Clojure 1.11.2** * **1.11.1.1435 on Dec 29, 2023** * **Update to tools.deps 1.18.1394** * **1.11.1.1429 on Dec 4, 2023** * **Update to tools.deps 1.18.1374** * **1.11.1.1420 on Dec 4, 2023** * **TDEPS-119 Unable to start CLI in write-protected project directory** * **Update to tools.deps 1.18.1370** * **Update to tools.tools 0.3.2** * **1.11.1.1413 on Aug 26, 2023** * **No changes from prior** * **1.11.1.1409 on Aug 25, 2023** * **No changes from prior** * **1.11.1.1405 on Aug 22, 2023** * **GitHub releases now contain .sha256 files for binaries** * **1.11.1.1386 on Aug 14, 2023** * **Release artifacts are now published to GitHub, and the download archive is used only as a mirror** * **1.11.1.1369 on Aug 14, 2023** * **Download and mirroring wip** * **1.11.1.1365 on Aug 13, 2023** * **Download and mirroring wip** * **1.11.1.1347 on May 31, 2023** * **With -X or -T accept `-` as a trailing argument to read the remainder of args from stdin** * **On windows installer, hide progress bar on download** * **Update to tools.deps 0.18.1354** * **Update to tools.tools 0.3.1** * **1.11.1.1273 on Apr 3, 2023** * **Change help text to point to -X:deps mvn-pom instead of -Spom** * **Switch to tools.deps 0.18.1335** * **1.11.1.1267 on Mar 31, 2023** * **Switch to tools.deps 0.18.1331** * **1.11.1.1262 on Mar 27, 2023** * **Switch to tools.deps 0.18.1317** * **1.11.1.1257 on Mar 15, 2023** * **Switch to tools.deps 0.18.1308** * **1.11.1.1252 on Mar 6, 2023** * **Switch to passing exec args via the basis :argmap** * **Function execution protocol support for -X/-T** * **Switch to tools.deps 0.17.1297** * **1.11.1.1237 on Feb 27, 2023** * **Updates on -R and -C error messages** * 1.11.1.1234 on Feb 27, 2023 * Remove deprecated support for -R and -C * Clean up help text around repl supporting init-opts * Switch to tools.deps 0.16.1285 * **1.11.1.1224** on Feb 12, 2023** * **Switch to tools.deps 0.16.1281** * **TDEPS-236 Add rlwrap -m to clj for multiline editing** * **1.11.1.1208 on Dec 11, 2022** * **Switch to tools.deps 0.16.1264** * **TDEPS-234 - Set -XX:-OmitStackTraceInFastThrow always** * **1.11.1.1200 on Nov 14, 2022** * **Update to tools.deps.alpha 0.15.1254** * **Update to tools.tools v0.2.9** * 1.11.1.1194 on Nov 14, 2022 * Update to tools.deps.alpha 0.15.1250 * **1.11.1.1189 on Nov 2, 2022** * **TDEPS-233 bash script fixes from stale jar check changes** * **Add some missing items on help and man page** * **1.11.1.1182 on Oct 24, 2022** * **Update to tools.deps.alpha 0.15.1244** * 1.11.1.1177 on Oct 23, 2022 * Fix bug in posix-install.sh * 1.11.1.1174 on Oct 23, 2022 * TDEPS-70 - Detect missing jar in classpath and recompute * TDEPS-200 - Clean up default user deps.edn * TDEPS-232 - Add more generic posix installer * Update to tools.deps.alpha 0.15.1237 * **1.11.1.1165 on Sep 18, 2022** * Extended the env var support to Windows * 1.11.1.1161 on Sep 16, 2022 * Use `$CLJ_JVM_OPTS` as jvm options on calls to internal tooling (making classpaths etc) * Use `$JAVA_OPTS` as jvm options on calls to user programs * **1.11.1.1155 on Aug 5, 2022** * **Update to tools.deps.alpha 0.14.1222** * **1.11.1.1149 on Jun 21, 2022** * **Update to tools.tools 0.2.8** * 1.11.1.1145 on Jun 20, 2022 * Update to tools.tools 0.2.7 * Update to tools.deps.alpha 0.14.1212 * **1.11.1.1139 on Jun 16, 2022** * **Update to tools.tools 0.2.6** * **Update to tools.deps.alpha 0.14.1205** * 1.11.1.1135 on Jun 16, 2022 * Update to tools.deps.alpha 0.14.1200 * **1.11.1.1129 on Jun 12, 2022** * **Update to tools.deps.alpha 0.14.1194** * **1.11.1.1124** on Jun 11, 2022 * **Update to tools.deps.alpha 0.14.1189** * **1.11.1.1119** on Jun 9, 2022 * **Update to tools.deps.alpha 0.14.1185** * **1.11.1.1113** on Apr 22, 2022 * **Update to tools.deps.alpha 0.14.1178** * **Update to tools.build v0.8.1** * **1.11.1.1105 on Apr 5, 2022** * **Update to clojure 1.11.1** * **1.11.0.1100 on Mar 28, 2022** * **No changes from prior** * 1.11.0.1097 on Mar 25, 2022 * Update to clojure 1.11.0 * 1.10.3.1093 on Mar 21, 2022 * Update to tools.deps.alpha 0.12.1162 * **1.10.3.1087 on Feb 28, 2022** * **Update to tools.deps.alpha 0.12.1158** * **Update to tools.build v0.8.0** * 1.10.3.1082 on Feb 11, 2022 * Update to tools.deps.alpha 0.12.1148 * **1.10.3.1075 on Feb 2, 2022** * **Update to tools.deps.alpha 0.12.1135** * **1.10.3.1069 on Jan 26, 2022** * **Update to tools.deps.alpha 0.12.1120** * **Update to tools.tools v0.2.5** * **Add check to error on invocation of multiple exec functions** * **1.10.3.1058 on Jan 4, 2022** * **Update to tools.deps.alpha 0.12.1109** * 1.10.3.1053 on Dec 23, 2021 * Update to tools.deps.alpha 0.12.1104 * Update to tools.tools 0.2.3 * Build with tools.build 0.7.3 * 1.10.3.1049 on Dec 22, 2021 * Update to tools.deps.alpha 0.12.1098 * **1.10.3.1040 on Dec 1, 2021** * **Update to tools.deps.alpha 0.12.1084** * 1.10.3.1036 on Nov 30, 2021 * Update to tools.deps.alpha 0.12.1080 * **1.10.3.1029 on Nov 8, 2021** * **Update to tools.deps.alpha 0.12.1071** * **Update to tools.tools 0.2.2** * **Update to tools.build 0.6.3** * **1.10.3.1020 on Nov 4, 2021** * **TDEPS-83 - invalidate cp cache when local manifest is missing** * **Update to tools.deps.alpha 0.12.1067** * 1.10.3.1013 on Oct 30, 2021 * Undo: -Stree no longer forces cache recompute * 1.10.3.1007 on Oct 29, 2021 * TDEPS-83 - invalidate cp cache when local lib manifests are stale * -Stree no longer forces cache recompute * Clean up exception handling for -X * Update to tools.deps.alpha 0.12.1063 * **1.10.3.998 on Oct 26, 2021** * **Remove `bottle :unneeded` from brew formulas** * **Update to tools.deps.alpha 0.12.1058** * **Update to tools.tools v0.2.1** * **1.10.3.986 on Sept 22, 2021** * **Rebuild to actually include latest tools.deps.alpha** * **Update to tools.deps.alpha 0.12.1048** * **1.10.3.981 on Sept 17, 2021** * **Update to tools.build v0.5.0** * 1.10.3.976 on Sept 17, 2021 * Update to tools.deps.alpha 0.12.1041 * **1.10.3.967 on Aug 31, 2021** * **Undo compilation of exec stub jar** * 1.10.3.962 on Aug 30, 2021 * Modify build to compile tools.deps entry points and exec stub jar * Update to tools.deps.alpha 0.12.1036 * 1.10.3.956 on Aug 27, 2021 * Refine exec exceptions for missing namespace vs missing function in namespace * Update to tools.deps.alpha 0.12.1030 * Build the Clojure CLI with tools.build, instead of Maven * 1.10.3.949 on Aug 17, 2021 * Update to tools.deps.alpha 0.12.1026 * **1.10.3.943 on Aug 10, 2021** * **Update to tools.deps.alpha 0.12.1019** * 1.10.3.939 on Aug 9, 2021 * Update to tools.deps.alpha 0.12.1013 * **1.10.3.933 on July 28, 2021** * **TDEPS-198 - on -X, don't use System/exit or shutdown-agents (but don't let agent threads block exit)** * 1.10.3.929 on July 21, 2021 * TDEPS-189 Port -T changes to Windows * Did some script cleanup in bash * 1.10.3.920 on July 19, 2021 * Fix regression in -X execution * 1.10.3.916 on July 19, 2021 * TDEPS-187 - redo how -X and -T get execute arg data * Update to tools.deps.alpha 0.12.1003 * 1.10.3.912 on July 15, 2021 * On -X success, exit with (shutdown-agents) instead of System/exit * TDEPS-187 - pass -A aliases along with -Ttool * 1.10.3.905 on July 9, 2021 * Removing multi-function support from -X and -T for now * 1.10.3.899 on July 9, 2021 * New tools support * Added -T * Update to tools.deps.alpha 0.12.985 * 1.10.3.882 on June 15, 2021 * On -X success, exit with System/exit to avoid hang from futures * Bind namespace resolution context around -X * 1.10.3.875 on June 10, 2021 * New: support for specifying multiple functions with -X with -> semantics * TDEPS-182 - Improve deprecation message to be more accurate * TDEPS-183 - Fix -Sdescribe output to be valid edn on Windows * Update to tools.deps.alpha 0.11.931 * **1.10.3.855 on May 25, 2021** * **Fix bug in applying :jvm-opts flags for -X on Windows** * **1.10.3.849 on May 20, 2021** * **Add support for trailing map in -X calls** * **Update to tools.deps.alpha 0.11.922** * **1.10.3.839 on May 12, 2021** * **Fix breakage in linux installer in 1.10.3.833** * **1.10.3.833 on May 11, 2021** * **Clean up script variables** * 1.10.3.829 on May 11, 2021 * Update to tools.deps.alpha 0.11.918 * **1.10.3.822 on Apr 3, 2021** * **Update to tools.deps.alpha 0.11.910** * **1.10.3.814 on Mar 11, 2021** * **Update to tools.deps.alpha 0.11.905** * 1.10.3.810 on Mar 10, 2021 * Use Clojure 1.10.3 by default * Update to tools.deps.alpha 0.11.901 * 1.10.2.805 on Mar 10, 2021 * Update to tools.deps.alpha 0.10.895 * 1.10.2.801 on Mar 3, 2021 * Update to tools.deps.alpha 0.10.889 * **1.10.2.796 on Feb 23, 2021** * **Update to tools.deps.alpha 0.9.884** * **1.10.2.790 on Feb 19, 2021** * **Add -version and --version to print Clojure CLI version (to stderr and stdout respectively)** * 1.10.2.786 on Feb 17, 2021 * TDEPS-56 - fix main-opts and jvm-opts splitting on space * Update to tools.deps.alpha 0.9.876 * 1.10.2.781 on Feb 8, 2021 * TDEPS-125 - use `JAVA_CMD` if set * Update to tools.deps.alpha 0.9.871 * **1.10.2.774 on Jan 26, 2021** * **Change default Clojure dep to 1.10.2** * **Update to tools.deps.alpha 0.9.863** * 1.10.1.769 on Jan 26, 2021 * Update to tools.deps.alpha 0.9.859 * **1.10.1.763 on Dec 10, 2020** * **Set exit code for -X ex-info error** * **Sync up cli syntax for aliases in help** * **1.10.1.754 on Dec 7, 2020** * **Update to tools.deps.alpha 0.9.857** * **Update Windows scripts for new -Stree format** * 1.10.1.749 on Dec 6, 2020 * Update -Stree to use new tree printer * Update to tools.deps.alpha 0.9.853 * 1.10.1.745 on Dec 2, 2020 * Update to tools.deps.alpha 0.9.847 * **1.10.1.739 on Nov 23, 2020** * **Update to tools.deps.alpha 0.9.840** * 1.10.1.735 on Oct 30, 2020 * Fix double throw in -X handling * Error if -A used without an alias * **1.10.1.727 on Oct 21, 2020** * **Update to tools.deps.alpha 0.9.833** * 1.10.1.723 on Oct 20, 2020 * Fix `clj -X:deps tree` adding tools.deps.alpha to tree * Fix `clj -X:deps mvn-pom` adding tools.deps.alpha to pom deps * Fix `clj -X:deps git-resolve-tags` not working * Update to tools.deps.alpha 0.9.828 * **1.10.1.716 on Oct 10, 2020** * **Make edn reading tolerant of unknown tagged literals** * **Update to tools.deps.alpha 0.9.821** * **1.10.1.708 on Oct 7, 2020** * **Update to tools.deps.alpha 0.9.816** * **TDEPS-168 - Fix error message handling for -X** * **1.10.1.697 on Sep 25, 2020** * **Update to tools.deps.alpha 0.9.810** * 1.10.1.693 on Sep 21, 2020 * Update windows scripts for latest * Re-instate -Stree * Update to tools.deps.alpha 0.9.799 * 1.10.1.681 on Sep 11, 2020 * Reinstate -R, -C, and -Spom as deprecated options * Update to tools.deps.alpha 0.9.795 * 1.10.1.672 on Sep 4, 2020 * Add -P to prepare (download, cache classpath) without execution * Enhance -X and -M to support all argmaps * Enhance -X to support ad hoc function (-F removed) * Add new argmap keys for -X, :ns-default, :ns-aliases * Deprecate main args without -M * Remove -T, -R, -C, -O * In deps.edn, deprecate :deps/:paths in alias (change to :replace-deps/:replace-paths) * In deps.edn, change :fn/:args to :exec-fn/:exec-args * Move -Sdeps, -Spom, -Sresolve-tags into -X:deps invocations * Update to tools.deps.alpha 0.9.782 * 1.10.1.645 on Aug 9, 2020 * Update to tools.deps.alpha 0.9.763 * 1.10.1.641 on Aug 8, 2020 * Fix clj -X to make :args optional * 1.10.1.636 on Aug 7, 2020 * Fix clj -X arg handler in Windows * Update to tools.deps.alpha 0.9.759 * 1.10.1.619 on July 31, 2020 * Error handling on -X :args * 1.10.1.615 on July 30, 2020 * Add -F function exec * Update to tools.deps.alpha 0.9.751 * 1.10.1.604 on July 28, 2020 * Fix clj -X arg handler in Windows * 1.10.1.600 on July 28, 2020 * Fix clj -X handler in Windows * 1.10.1.596 on July 28, 2020 * Fix clj -X handler * 1.10.1.590 on July 22, 2020 * Added new execution mode to execute a function that takes an argmap via -X * Added support for using data stored in aliases as :paths * Added explicit "tool" step to cover :deps and :paths replacement, which can be passed via alias -T * Update to tools.deps.alpha 0.9.745 * **1.10.1.561 on July 17, 2020** * **Update to tools.deps.alpha 0.8.709** * 1.10.1.554 on July 15, 2020 * Update to tools.deps.alpha 0.8.702 * **1.10.1.547 on June 11, 2020** * **In Windows impl, use Write-Output when returning values like with -Spath** * **Update to tools.deps.alpha 0.8.695** * 1.10.1.524-**1.10.1.536 on Feb 28, 2020** * Working on release automation, no changes * **All releases older than this were stable releases** * 1.10.1.510 on Feb 14, 2020 * Update to tools.deps.alpha 0.8.677 * 1.10.1.507 on Jan 30, 2020 * Update to tools.deps.alpha 0.8.661 * Add -Sthreads option for concurrent downloads * Use -- to separate dep options and clojure.main options * 1.10.1.502 on Jan 20, 2020 * Report clj version in clj -h * Update to tools.deps.alpha 0.8.640 * 1.10.1.496 on Jan 16, 2020 * Update to tools.deps.alpha 0.8.624 * Remove -Xms on tool jvms * 1.10.1.492 on Nov 25, 2019 * Fix bad condition checking whether to write trace.edn * 1.10.1.489 on Nov 20, 2019 * Update to tools.deps.alpha 0.8.599 * Join aliases in windows script without spaces * Added -Strace option * 1.10.1.483 on Nov 4, 2019 * Update to tools.deps.alpha 0.8.584 * Use homebrew ruby to minimize env conflicts * 1.10.1.478 on Oct 18, 2019 * Update to tools.deps.alpha 0.8.567 * Report locations of user and project configs in -Sdescribe * 1.10.1.472 on Oct 15, 2019 * Update to tools.deps.alpha 0.8.559 * 1.10.1.469 on Aug 9, 2019 * Update to tools.deps.alpha 0.7.541 * Add slf4j-nop which was removed from tools.deps.alpha * 1.10.1.466 on July 17, 2019 * Use min heap setting, not max, on internal tool calls * Update to tools.deps 0.7.527 * 1.10.1.462 on July 3, 2019 * Rollback deps.edn install changes and install again * 1.10.1.458 on June 29, 2019 * Update to tools.deps 0.7.511 * 1.10.1.455 on June 28, 2019 * Fix some manpage/help formatting * TDEPS-131 Fix bug tracker link in man page * Update to tools.deps 0.7.505 * Stop installing deps.edn, now embedded in tools.deps * 1.10.1.447 on June 6, 2019 * Add new clj option to man page and clj help * 1.10.1.445 on June 6, 2019 * Change default Clojure to 1.10.1 * 1.10.0.442 on Mar 16, 2019 * Update to tools.deps.alpha 0.6.496 * Early release of Windows clj * 1.10.0.414 on Feb 13, 2019 * Update to tools.deps.alpha 0.6.488 * 1.10.0.411 on Jan 4, 2019 * Update to tools.deps.alpha 0.6.480 * 1.10.0.408 on Jan 2, 2019 * Update to tools.deps.alpha 0.6.474 * FIX TDEPS-82 - ensure -Sdescribe doesn't trigger resolution * 1.10.0.403 on Dec 17, 2018 * Changed default Clojure version to 1.10 * 1.9.0.397 on Oct 17, 2018 * Update to tools.deps.alpha 0.5.460 * 1.9.0.394 on Sept 15, 2018 * Update to tools.deps.alpha 0.5.452 * 1.9.0.391 on July 19, 2018 * FIX TDEPS-77 - fix bad break character in rlwrap * FIX TDEPS-86 - use non-0 exit code in clj if rlwrap doesn't exist * FIX TDEPS-87 - change wording describing -Sdeps in help and man * 1.9.0.381 on May 11, 2018 * FIX TDEPS-76 - use exec for final Java invocation in script * NEW Convey lib map via Java system property * 1.9.0.375 on Apr 14, 2018 * FIX TDEPS-61 - switch to use Clojars CDN repo * FIX TDEPS-71 - better error if Java not installed * FIX TDEPS-65 - specify permissions on installed files * 1.9.0.358 on Mar 2, 2018 * FIX linux-install - use mkdir -p to ensure parent dirs are created * FIX brew install - move man page installation from formula to install.sh * FIX TDEPS-45 - don't swipe -h flag if main aliases are in effect * FIX TDEPS-47 - use classpath cache with -Sdeps * 1.9.0.348 on Feb 23, 2018 * NEW Add --prefix to linux-install (INST-9) * NEW Add man page to installation (INST-18) * FIX Fix uberjar construction to avoid overlap of file and directory with same name * FIX Add missing license file * 1.9.0.341 on Feb 21, 2018 * CHANGE -Senv to -Sdescribe * 1.9.0.338 on Feb 20, 2018 * NEW -Senv - print edn for Clojure config, similar to -Sverbose info * NEW -Scp - provide a custom classpath and ignore classpath gen * 1.9.0.326 on Feb 2, 2018 * NEW -O - Java option aliases (append if multiple) * NEW -M - clojure.main option aliases (replace if multiple) * NEW -A - generic alias can combine any kind of alias and all are applied * FIX - if multiple alias switches supplied, they combine * FIX - whitespace in help fixed * 1.9.0.315 on Jan 23, 2018 * NEW -Stree to print dependency tree * NEW -Sdeps to supply a deps.edn on the command line as data * FIX bug with git deps using :deps/root writing File objects to libs files * 1.9.0.309 on Jan 18, 2018 * NEW -Spom emits dep exclusions and classifier * NEW pom file reader for local and git deps * FIX git deps now use :deps/root if specified * FIX major updates to improve transitive version selection * ENHANCE git version resolution uses stricter rules in comparison * ENHANCE dump stack on unexpected errors for debugging * 1.9.0.302 on Jan 8, 2018 * CHANGE git dep attributes (removed :rev, added :tag and :sha) * FIX Java 9 warning with -Spom * NEW -Sresolve-tags * 1.9.0.297 on Jan 4, 2018 * NEW git deps * NEW Updated -Spom to include repositories in the pom * 1.9.0.273 on Dec 8, 2017 * Initial release for 1.9 brew-install-1.12.0.1488/LICENSE000066400000000000000000000263741471772614100156340ustar00rootroot00000000000000Eclipse Public License - v 1.0 THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. 1. DEFINITIONS "Contribution" means: a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and b) in the case of each subsequent Contributor: i) changes to the Program, and ii) additions to the Program; where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program. "Contributor" means any person or entity that distributes the Program. "Licensed Patents" mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program. "Program" means the Contributions distributed in accordance with this Agreement. "Recipient" means anyone who receives the Program under this Agreement, including all Contributors. 2. GRANT OF RIGHTS a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form. b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder. c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program. d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement. 3. REQUIREMENTS A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that: a) it complies with the terms and conditions of this Agreement; and b) its license agreement: i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose; ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits; iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange. When the Program is made available in source code form: a) it must be made available under this Agreement; and b) a copy of this Agreement must be included with each copy of the Program. Contributors may not remove or alter any copyright notices contained within the Program. Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution. 4. COMMERCIAL DISTRIBUTION Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense. For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages. 5. NO WARRANTY EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement , including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations. 6. DISCLAIMER OF LIABILITY EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 7. GENERAL If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. If Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed. All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive. Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved. This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation. brew-install-1.12.0.1488/README.md000066400000000000000000000042271471772614100160770ustar00rootroot00000000000000brew-install ===================================== The brew-install project is used to create a brew formula for installing clojure tools on the Mac. The outputs of this project are a tar file (versioned) and a brew formula (clojure.rb), suitable for updating in the brew central tap. The tar file contains: * clojure-tools jar - an uberjar for constructing classpaths via tools.deps * deps.edn - a copy of the root deps.edn file (no longer used at runtime) * example-deps.edn - the initial user deps.edn file * tools.edn - the tools.tools tool to auto install * clojure script - the main Clojure runner * clj script - a clojure wrapper for interactive repl use (adds rlwrap) ## Updating versions The clojure-tools version is defined by the pom.xml project version. It should be updated only by running script/update_version (the build does this automatically). The current version is stored in the VERSION file. The Clojure and tools.deps versions to include in the clojure-tools are taken from the deps.edn. ## Package script To create the packages and installers, run: ``` clojure -T:build release ``` ## Release Information These files are not released into Maven central like other libraries. Instead, the tar file is created and published to https://download.clojure.org. The [Clojure homebrew tap](https://github.com/clojure/homebrew-tools) is updated when new releases are created or promoted to stable. The Homebrew Central Clojure recipe is updated manually so may lag the Clojure tap. ## References See the following resources for more information: * https://clojure.org/guides/getting_started - installation * https://clojure.org/guides/deps_and_cli - deps and CLI guide * https://clojure.org/reference/deps_and_cli - deps and CLI reference * https://github.com/clojure/tools.deps - dependency and classpath library ## Developer Information * [GitHub project](https://github.com/clojure/brew-install) * [How to contribute](https://clojure.org/community/contributing) * [Bug Tracker](https://clojure.atlassian.net/browse/TDEPS) ## License Copyright © Rich Hickey, Alex Miller and contributors Distributed under the Eclipse Public License 1.0, the same as Clojure. brew-install-1.12.0.1488/VERSION000066400000000000000000000000141471772614100156560ustar00rootroot000000000000001.12.0.1488 brew-install-1.12.0.1488/VERSION_TEMPLATE000077500000000000000000000000311471772614100171530ustar00rootroot000000000000001.12.0.GENERATED_VERSION brew-install-1.12.0.1488/deps.edn000066400000000000000000000013471471772614100162430ustar00rootroot00000000000000{:paths [] :deps {org.clojure/clojure {:mvn/version "1.12.0"} org.clojure/tools.deps {:mvn/version "0.21.1460"} org.slf4j/slf4j-nop {:mvn/version "1.7.36"}} :aliases { ;; clj -T:build release :build {:deps {io.github.clojure/tools.build {:git/tag "v0.10.5" :git/sha "2a21b7a"}} :paths ["script"] :ns-default build} ;; clj -X:test :test {:extra-paths ["src/test/clojure" "src/main/clojure"] :extra-deps {io.github.cognitect-labs/test-runner {:git/tag "v0.5.1" :git/sha "dfb30dd"}} :exec-fn cognitect.test-runner.api/test :exec-args {:dirs ["src/test/clojure"] :patterns [".*"]} :jvm-opts ["-XX:-OmitStackTraceInFastThrow"]} }} brew-install-1.12.0.1488/devel.properties000066400000000000000000000001151471772614100200250ustar00rootroot000000000000001.12.0.1488 bc19be0010bef0421c26fd3bec7bc3bca08c192828d59a151845422dc4420742 brew-install-1.12.0.1488/doc/000077500000000000000000000000001471772614100153605ustar00rootroot00000000000000brew-install-1.12.0.1488/doc/clojure.1000066400000000000000000000103601471772614100171050ustar00rootroot00000000000000.\"to render: groff -Tascii -man doc/clojure.1 > clojure.man" .TH CLOJURE 1 "2019 June 6" .SH NAME clj, clojure \- runners to launch Clojure programs .SH SYNOPSIS .B clj [\fBclj-opts\fR] [\fB-Aaliases\fR] .br .B clojure [\fBclj-opts\fR] \fB-X\fR[\fBaliases\fR] \fBmy/fn?\fR [\fBkpath v\fR ...] \fBkv-map?\fR .br .B clojure [\fBclj-opts\fR] \fB-T\fR[\fBname|aliases\fR] \fBmy/fn\fR [\fBkpath v\fR ...] \fBkv-map?\fR .br .B clojure [\fBclj-opts\fR] \fB-M\fR[\fBaliases\fR] [\fBinit-opts\fR] [\fBmain-opts\fR] [\fBargs\fR] .SH DESCRIPTION The .B clojure tool is a runner for Clojure programs. .B clj is a wrapper for .B clojure that uses rlwrap to provide a better interactive experience. Users will typically run .BR clj . .SH EXAMPLES You can launch a Clojure REPL by running .BR clj . See the Deps and CLI Guide below for more complex usage. .SH OPTIONS The .B clj and .B clojure scripts can take three types of options, as shown in the synopsis. .B clj-opts are used to build the java-opts and classpath. .B init-opts refer to Clojure code to execute. .B main-opts are options to clojure.main. .SS clj-opts .TP .BI \-J opt Pass opt through in java_opts, ex: -J-Xmx512m .TP .BI \-A aliases Concatenated aliases for REPL execution, ex: -A:dev:mem .TP .BI \-X aliases\ \fIfn\fR " " \fIKPATH\fR " " \fIV\fR " " Exec alias to invoke one or more functions that take a map, with keypath/value overrides. Function must either be supplied or be in :exec-fn argmap for alias .TP .BI \-M aliases Exec clojure.main, either from opts in alias or command line .TP .BI \-P Prepare - download libs, cache classpath without executing .TP .BI \-Sdeps\ EDN Deps data to use as the last deps file to be merged .TP .BI \-Spath Compute classpath and echo to stdout only .TP .BI \-Stree Print dependency tree .TP .BI \-Scp\ CP Do NOT compute or cache classpath, use this one instead .TP .BI \-Srepro Ignore the ~/.clojure/deps.edn config file .TP .BI \-Sforce Force recomputation of the classpath (don't use the cache) .TP .BI \-Sverbose Print important path info to console .TP .BI \-Sdescribe Print environment and command parsing info as data .TP .BI \-Sthreads\ N Set specific number of download threads .TP .BI \-Strace Write a trace.edn file that traces deps expansion .TP .BI \-\- Stop parsing dep options and pass remaining arguments to clojure.main .TP .BI \-\-version Write version to stdout and exit .TP .BI \-version Write version to stderr and exit .SS init-opts .TP .BR \-i ", " \-\-init\ \fIpath\fR Load a file or resource located at \fIpath\fR .TP .BR \-e ", " \-\-eval\ \fIstring\fR Eval exprs in \fIstring\fR; print non-nil values .TP .BR \-\-report\ \fItarget\fR Report uncaught exception to \fItarget\fR: "file" (default), "stderr", or "none", overrides System property clojure.main.report .SS main-opts .TP .BR \-m ", " \-\-main\ \fIns-name \fR Call the -main function from namespace w/args .TP .BR \-r ", " \-\-repl Run a repl .TP .I path Run a script from a file or resource located at \fIpath\fR .TP .B \- Run a script from standard input .TP .BR \-h ", " \-? ", " \-\-help Print this help message and exit .SH CONFIGURATION This script reads configuration from .B deps.edn files. It will check against .B deps.edn files in the system root location, the user configuration directory (usually .BR ~/.clojure ), and the local directory. Files in each of these locations, if they exist, are merged to form one combined configuration file. The last specified configuration file's options overwrites any earlier files (e.g. local configs take priority). .SH SEE ALSO .IP https://clojure.org/guides/deps_and_cli Deps and CLI Guide .IP https://clojure.org/reference/deps_edn deps.edn Reference .IP https://clojure.org/reference/clojure_cli Clojure CLI Reference .IP https://clojure.org/reference/repl_and_main REPL and Main Entrypoints .IP https://clojure.org/releases/tools Release history and changelog .SH BUGS File issues at https://ask.clojure.org under category Libs / tools.deps. .SH AUTHORS clojure and clj are maintained by Alex Miller . This man page was written by Elana Hashman . .SH COPYRIGHT Copyright \(co Rich Hickey, Alex Miller and contributors. Distributed under the Eclipse Public License 1.0, the same as Clojure. brew-install-1.12.0.1488/epl.html000066400000000000000000000305361471772614100162700ustar00rootroot00000000000000 Eclipse Public License - Version 1.0

Eclipse Public License - v 1.0

THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.

1. DEFINITIONS

"Contribution" means:

a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and

b) in the case of each subsequent Contributor:

i) changes to the Program, and

ii) additions to the Program;

where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program.

"Contributor" means any person or entity that distributes the Program.

"Licensed Patents" mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program.

"Program" means the Contributions distributed in accordance with this Agreement.

"Recipient" means anyone who receives the Program under this Agreement, including all Contributors.

2. GRANT OF RIGHTS

a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form.

b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder.

c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program.

d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement.

3. REQUIREMENTS

A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that:

a) it complies with the terms and conditions of this Agreement; and

b) its license agreement:

i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose;

ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits;

iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and

iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange.

When the Program is made available in source code form:

a) it must be made available under this Agreement; and

b) a copy of this Agreement must be included with each copy of the Program.

Contributors may not remove or alter any copyright notices contained within the Program.

Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution.

4. COMMERCIAL DISTRIBUTION

Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense.

For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages.

5. NO WARRANTY

EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement , including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations.

6. DISCLAIMER OF LIABILITY

EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

7. GENERAL

If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.

If Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed.

All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive.

Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved.

This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation.

brew-install-1.12.0.1488/script/000077500000000000000000000000001471772614100161175ustar00rootroot00000000000000brew-install-1.12.0.1488/script/build.clj000066400000000000000000000077761471772614100177310ustar00rootroot00000000000000(ns build (:require [clojure.string :as str] [clojure.tools.build.api :as b])) ;; project config (def lib 'org.clojure/clojure-tools) (def version (str/trim (slurp "VERSION"))) (def basis (b/create-basis {})) (def clojure-ver (get-in basis [:libs 'org.clojure/clojure :mvn/version])) (def stable (str/split (str/trim (slurp "stable.properties")) #" ")) ;; dirs (def doc-dir "doc") (def target-dir "target") (def filtered-dir "target/filtered") (def class-dir "target/classes") (def exec-dir "target/exec") (def tar-dir "target/clojure-tools") (def zip-dir "target/win") (def uber-file (format "target/clojure-tools-%s.jar" version)) (def tar-file (format "target/clojure-tools-%s.tar.gz" version)) (def zip-file "target/clojure-tools.zip") (def exec-file "target/exec.jar") (defn clean [_] (b/delete {:path "target"})) (defn release [_] (clean nil) ;; Filter all resources, replacing properties as needed (b/copy-dir {:src-dirs ["src/main/resources"] :target-dir filtered-dir :replace {"${project.version}" version "${version.short}" (str/replace version "." "") "${clojure.version}" clojure-ver "${tools.deps.version}" (get-in basis [:libs 'org.clojure/tools.deps :mvn/version]) "${stable.version}" (first stable) "${stable.sha}" (second stable)}}) ;; Make the uber jar (b/compile-clj {:basis basis :class-dir class-dir :src-dirs [] :compile-opts {:elide-meta [:doc :file :line] :direct-linking true} :ns-compile '[clojure.tools.deps.script.make-classpath2 clojure.tools.deps.script.generate-manifest2 clojure.tools.deps.util.s3-aws-client]}) (b/uber {:basis basis :class-dir class-dir :uber-file uber-file}) ;; Make the exec jar (b/copy-dir {:src-dirs ["src/main/clojure"] :target-dir exec-dir}) (b/jar {:class-dir exec-dir :jar-file exec-file}) ;; Collect the tar file contents and make the tar and installer (doseq [f ["clojure" "clj" "install.sh" "linux-install.sh" "posix-install.sh"]] (b/process {:command-args ["chmod" "+x" (str filtered-dir "/clojure/install/" f)]})) (doseq [f ["clj" "clojure" "install.sh" "deps.edn" "example-deps.edn" "tools.edn"]] (b/copy-file {:src (str filtered-dir "/clojure/install/" f) :target (str tar-dir "/" f)})) (b/copy-file {:src (str doc-dir "/clojure.1") :target (str tar-dir "/clojure.1")}) (b/copy-file {:src (str doc-dir "/clojure.1") :target (str tar-dir "/clj.1")}) (b/copy-dir {:src-dirs [target-dir] :target-dir tar-dir :include "*.jar"}) (b/process {:command-args ["tar" "-cvzf" tar-file "-Ctarget" "clojure-tools"]}) (b/copy-file {:src (str filtered-dir "/clojure/install/linux-install.sh") :target (str target-dir "/linux-install.sh")}) (b/copy-file {:src (str filtered-dir "/clojure/install/posix-install.sh") :target (str target-dir "/posix-install.sh")}) ;; Collect the windows files and make the windows zip file and installer (doseq [f ["ClojureTools.psd1" "ClojureTools.psm1" "deps.edn" "example-deps.edn" "tools.edn"]] (b/copy-file {:src (str filtered-dir "/clojure/install/" f) :target (str zip-dir "/ClojureTools/" f)})) (b/copy-dir {:src-dirs [target-dir] :target-dir (str zip-dir "/ClojureTools") :include "*.jar"}) (b/zip {:src-dirs [zip-dir] :zip-file zip-file}) (b/copy-file {:src (str filtered-dir "/clojure/install/win-install.ps1") :target (str target-dir "/win-install.ps1")}) ;; Prep the brew files (let [sha (-> (:out (b/process {:command-args ["shasum" "-a" "256" tar-file] :out :capture})) (subs 0 64)) brew-recipe (slurp (str filtered-dir "/clojure/install/clojure.rb")) version-recipe (slurp (str filtered-dir "/clojure/install/clojure@version.rb"))] (b/write-file {:path "target/clojure.rb" :string (str/replace brew-recipe "SHA" sha)}) (b/write-file {:path (format "target/clojure@%s.rb" version) :string (str/replace version-recipe "SHA" sha)}))) brew-install-1.12.0.1488/script/print_version000077500000000000000000000002361471772614100207470ustar00rootroot00000000000000#!/usr/bin/env bash set -e version_template=$(cat VERSION_TEMPLATE) rev=$(git rev-list HEAD --count) v=${version_template/GENERATED_VERSION/$rev} echo "$v" brew-install-1.12.0.1488/script/publish.sh000077500000000000000000000042121471772614100201230ustar00rootroot00000000000000#!/bin/bash set -e # Commit and deploy to s3 if [[ ! -z "$S3_BUCKET" ]]; then # Write devel properties version=$(cat VERSION) sha=$(shasum -a 256 "target/clojure-tools-$version.tar.gz" | cut -c 1-64) echo "$sha" > target/clojure-tools-$version.tar.gz.sha256 echo "$version $sha" > devel.properties git add devel.properties git commit -m "update devel to $version" echo "Deploying https://download.clojure.org/install/clojure@$version.rb" aws s3 cp --only-show-errors "target/clojure.rb" "$S3_BUCKET/install/clojure.rb" aws s3 cp --only-show-errors "target/clojure@$version.rb" "$S3_BUCKET/install/clojure@$version.rb" echo "Deploying https://download.clojure.org/install/clojure-tools-$version.tar.gz" aws s3 cp --only-show-errors "target/clojure-tools-$version.tar.gz" "$S3_BUCKET/install/clojure-tools.tar.gz" aws s3 cp --only-show-errors "target/clojure-tools-$version.tar.gz" "$S3_BUCKET/install/clojure-tools-$version.tar.gz" echo "Deploying https://download.clojure.org/install/linux-install-$version.sh" aws s3 cp --only-show-errors "target/linux-install.sh" "$S3_BUCKET/install/linux-install.sh" aws s3 cp --only-show-errors "target/linux-install.sh" "$S3_BUCKET/install/linux-install-$version.sh" echo "Deploying https://download.clojure.org/install/posix-install-$version.sh" aws s3 cp --only-show-errors "target/posix-install.sh" "$S3_BUCKET/install/posix-install.sh" aws s3 cp --only-show-errors "target/posix-install.sh" "$S3_BUCKET/install/posix-install-$version.sh" echo "Deploying https://download.clojure.org/install/clojure-tools-$version.zip" echo "$(shasum -a 256 target/clojure-tools.zip | cut -c 1-64)" > target/clojure-tools.zip.sha256 aws s3 cp --only-show-errors "target/clojure-tools.zip" "$S3_BUCKET/install/clojure-tools.zip" aws s3 cp --only-show-errors "target/clojure-tools.zip" "$S3_BUCKET/install/clojure-tools-$version.zip" echo "Deploying https://download.clojure.org/install/win-install-$version.ps1" aws s3 cp --only-show-errors "target/win-install.ps1" "$S3_BUCKET/install/win-install.ps1" aws s3 cp --only-show-errors "target/win-install.ps1" "$S3_BUCKET/install/win-install-$version.ps1" fi brew-install-1.12.0.1488/script/read_versions.sh000077500000000000000000000005171471772614100213240ustar00rootroot00000000000000#!/bin/bash set -e # Grab version info read stable_version stable_sha < stable.properties read devel_version devel_sha < devel.properties echo "Promoting stable from $stable_version to $devel_version" export STABLE_VERSION=$stable_version export STABLE_SHA=$stable_sha export DEVEL_VERSION=$devel_version export DEVEL_SHA=$devel_shabrew-install-1.12.0.1488/script/update_version000077500000000000000000000002251471772614100210730ustar00rootroot00000000000000#!/usr/bin/env bash set -e v=$(script/print_version) echo "Setting version to $v" echo "$v" > VERSION git commit -m "update version to $v" VERSION brew-install-1.12.0.1488/src/000077500000000000000000000000001471772614100154025ustar00rootroot00000000000000brew-install-1.12.0.1488/src/main/000077500000000000000000000000001471772614100163265ustar00rootroot00000000000000brew-install-1.12.0.1488/src/main/clojure/000077500000000000000000000000001471772614100177715ustar00rootroot00000000000000brew-install-1.12.0.1488/src/main/clojure/clojure/000077500000000000000000000000001471772614100214345ustar00rootroot00000000000000brew-install-1.12.0.1488/src/main/clojure/clojure/run/000077500000000000000000000000001471772614100222405ustar00rootroot00000000000000brew-install-1.12.0.1488/src/main/clojure/clojure/run/exec.clj000066400000000000000000000233731471772614100236660ustar00rootroot00000000000000; Copyright (c) Rich Hickey. All rights reserved. ; The use and distribution terms for this software are covered by the ; Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php) ; which can be found in the file epl-v10.html at the root of this distribution. ; By using this software in any fashion, you are agreeing to be bound by ; the terms of this license. ; You must not remove this notice, or any other, from this software. (ns clojure.run.exec (:require ;; NOTE: ONLY depend on Clojure core, loaded in user's classpath so can't have any deps [clojure.edn :as edn] [clojure.java.io :as jio] [clojure.string :as str] [clojure.spec.alpha :as s]) (:import [clojure.lang ExceptionInfo] [java.io StringWriter Writer FileNotFoundException PushbackReader BufferedReader] [java.util.concurrent Executors ThreadFactory])) (set! *warn-on-reflection* true) (def ^:dynamic *ns-default* nil) (def ^:dynamic *ns-aliases* nil) (defn- err ^Throwable [& msg] (ex-info (str/join " " msg) {:exec-msg true})) (defn- requiring-resolve' ;; copied and modified from core to remove constraints on Clojure 1.10.x [sym] (if (nil? (namespace sym)) (throw (err "Not a qualified symbol:" sym)) (or (resolve sym) (do (-> sym namespace symbol require) (resolve sym))))) (defn remove-ns-keys "Remove keys in m with namespace string ns-str" [m ns-str] (reduce-kv #(if (= ns-str (namespace %2)) %1 (assoc %1 %2 %3)) {} m)) (defn- add-stream [envelope stream-tag ^Writer writer] (.flush writer) (let [s (str writer)] (if (str/blank? s) envelope (assoc envelope stream-tag s)))) (defn- envelope [args tag val out-wr err-wr start] (let [end (System/currentTimeMillis)] (cond-> {:tag tag :val (binding [*print-namespace-maps* false] (pr-str val)) :ms (- end start)} (= :capture (:clojure.exec/out args)) (add-stream :out out-wr) (= :capture (:clojure.exec/err args)) (add-stream :err err-wr)))) (defn apply-program [f args] (let [clean-args (remove-ns-keys args "clojure.exec") out-wr (StringWriter.) err-wr (StringWriter.) start (System/currentTimeMillis) envelope (binding [*out* out-wr, *err* err-wr] (try (envelope args :ret (f clean-args) out-wr err-wr start) (catch Throwable t (envelope args :err (Throwable->map t) out-wr err-wr start)) (finally (.close out-wr) (.close err-wr))))] (binding [*print-namespace-maps* false] (prn envelope)))) (defn exec "Resolve and execute the function f (a symbol) with args" [f args] (let [resolved-f (try (requiring-resolve' f) (catch FileNotFoundException _ (throw (err "Namespace could not be found on classpath:" (namespace f)))))] (if resolved-f (if (= :fn (:clojure.exec/invoke args)) (apply-program resolved-f args) (resolved-f args)) (throw (err "Namespace" (namespace f) "loaded but function not found:" (name f)))))) (defn- apply-overrides [args overrides] (reduce (fn [m [k v]] (if (sequential? k) (assoc-in m k v) (assoc m k v))) args (partition-all 2 overrides))) (defn- qualify-fn "Compute function symbol based on exec-fn, ns-aliases, and ns-default" [fsym ns-aliases ns-default] ;; validation - make specs? (when (and fsym (not (symbol? fsym))) (throw (err "Expected function symbol:" fsym))) (when fsym (if (qualified-ident? fsym) (let [nsym (get ns-aliases (symbol (namespace fsym)))] (if nsym (symbol (str nsym) (name fsym)) fsym)) (if ns-default (symbol (str ns-default) (str fsym)) (throw (err "Unqualified function can't be resolved:" fsym)))))) (defn- read-basis [] (when-let [f (jio/file (System/getProperty "clojure.basis"))] (if (and f (.exists f)) (->> f slurp (edn/read-string {:default tagged-literal})) (throw (err "No basis declared in clojure.basis system property"))))) (def arg-spec (s/cat :fns (s/? symbol?) :kvs (s/* (s/cat :k (s/nonconforming (s/or :keyword any? :path vector?)) :v any?)) :trailing (s/? map?))) (defn- build-fn-descriptor [{:keys [fns kvs trailing] :as extra}] (cond-> {} fns (assoc :function fns) trailing (assoc :trailing trailing) kvs (assoc :overrides (reduce #(-> %1 (conj (:k %2)) (conj (:v %2))) [] kvs)))) (defn- build-error [expl] (let [err-str (with-out-str (doseq [problem (:clojure.spec.alpha/problems expl)] (println (:reason problem) (:clojure.spec.alpha/value expl))))] (err "Problem parsing arguments: " err-str))) (defn- parse-fn [args] (when (seq args) (let [conf (s/conform arg-spec args)] (if (s/invalid? conf) (let [expl (s/explain-data arg-spec args)] (throw (build-error expl))) (build-fn-descriptor conf))))) (defn- read-args-stdin [prior-args] (let [eof (Object.) r (PushbackReader. (BufferedReader. *in*))] (loop [args prior-args] (let [arg (edn/read {:eof eof :default tagged-literal} r)] (if (= eof arg) args (recur (conj args arg))))))) (defn- read-args [args] (loop [[a & as] args read-args []] (if a (if (= a "-") (read-args-stdin read-args) (let [r (try (edn/read-string {:default tagged-literal} a) (catch Throwable _ (throw (err "Unreadable arg:" (pr-str a)))))] (recur as (conj read-args r)))) read-args))) (defn- set-daemon-agent-executor "Set Clojure's send-off agent executor (also affects futures). This is almost an exact rewrite of the Clojure's executor, but the Threads are created as daemons." [] (let [thread-counter (atom 0) thread-factory (reify ThreadFactory (newThread [_ runnable] (doto (Thread. runnable) (.setDaemon true) ;; DIFFERENT (.setName (format "CLI-agent-send-off-pool-%d" (first (swap-vals! thread-counter inc))))))) executor (Executors/newCachedThreadPool thread-factory)] (set-agent-send-off-executor! executor))) (defn ^:dynamic *exit* ;; normal exit ([]) ;; abnormal exit ([^Throwable t] (System/exit 1))) (defn -main "Execute a function with map kvs. The classpath is determined by the clojure script and make-classpath programs and has already been set. Any execute argmap keys indicated via aliases will be read from the basis file :argmap passed via -Dclojure.basis. The exec args have the following possible keys: :exec-fn - symbol to be resolved in terms of the namespace context, will be overridden if passed as arg :exec-args - map of kv args :ns-default - namespace default for resolving functions :ns-aliases - map of alias symbol to namespace symbol for resolving functions The actual args to exec are essentially same as to -X: [fn] (kpath v)+ map? fn is resolved from either :exec-fn or fn map to pass to fn is built from merge of: exec-args map map built from kpath/v's trailing map" [& args] (try (let [execute-args (:argmap (read-basis)) {:keys [function overrides trailing]} (-> args read-args parse-fn) {:keys [exec-fn exec-args ns-aliases ns-default]} execute-args f (or function exec-fn)] (when (nil? f) (if (symbol? (first overrides)) (throw (err "Key is missing value:" (last overrides))) (throw (err "No function found on command line or in :exec-fn")))) (set-daemon-agent-executor) (binding [*ns-default* ns-default *ns-aliases* ns-aliases] (let [qualified-fn (qualify-fn f ns-aliases ns-default) args (merge (apply-overrides exec-args overrides) trailing)] (exec qualified-fn args))) (*exit*)) (catch ExceptionInfo e (if (-> e ex-data :exec-msg) (binding [*out* *err*] (println (.getMessage e)) (*exit* e)) (throw e))))) (comment (parse-fn []) ;;=> nil (parse-fn [:a:b 'foo/bar]) ;;=> {:function [foo/bar]} (parse-fn [:a:b 'foo/bar :x 1 :y 2]) ;;=> {:function [foo/bar], :overrides [:x 1 :y 2]} (parse-fn [:a:b 'foo/bar :x 1 :y]) ;;=> Except, missing value for :y (parse-fn [:x 1 :k 1]) ;;=> {:overrides [:x 1 :k 1]} (parse-fn ['foo/bar]) ;;=> {:function [foo/bar]} (parse-fn ['foo/bar :x 1 :y]) ;;=> Except, missing value for :y (parse-fn [:x 1 :ZZZZZZZZZZZ]) ;;=> Except, missing value for :ZZZZZZZZZZZ (parse-fn [:a 1 :b 2]) ;;=> {:overrides [:a 1 :b 2]} (parse-fn [:a 1 :b 2 {:b 42}]) ;;=> {:overrides [:a 1 :b 2], :trailing {:b 42}} (parse-fn ['foo/bar {:a 1}]) ;;=> {:function [foo/bar], :trailing {:a 1}} (parse-fn [:x 1 :k 1 {:a 1}]) ;;=> {:overrides [:x 1 :k 1], :trailing {:a 1}} (parse-fn ['foo/bar :x 1 :y 2 {:y 42}]) ;;=> {:function [foo/bar], :overrides [:x 1 :y 2], :trailing {:y 42}} (parse-fn ['foo/bar :x 1 :y {:y 42}]) ;;=> {:function [foo/bar], :overrides [:x 1 :y {:y 42}]} (-> ["clojure.run.test-exec/save" ":a" "1" "[:b,:c]" "2"] read-args parse-fn) (s/conform arg-spec '[a b :a 1 :b 2 {}]) (s/conform arg-spec '[a b]) (s/conform arg-spec '[a]) (s/conform arg-spec '[a {:a 1 :b 2}]) (s/conform arg-spec '[:a 1 :b 2]) (s/conform arg-spec '[foo/bar :x 1 :y]) (s/conform arg-spec '[clojure.run.test-exec/save :a 1 [:b :c] 2])) brew-install-1.12.0.1488/src/main/resources/000077500000000000000000000000001471772614100203405ustar00rootroot00000000000000brew-install-1.12.0.1488/src/main/resources/clojure/000077500000000000000000000000001471772614100220035ustar00rootroot00000000000000brew-install-1.12.0.1488/src/main/resources/clojure/install/000077500000000000000000000000001471772614100234515ustar00rootroot00000000000000brew-install-1.12.0.1488/src/main/resources/clojure/install/ClojureTools.psd1000066400000000000000000000077301471772614100266750ustar00rootroot00000000000000@{ # Script module or binary module file associated with this manifest. RootModule = 'ClojureTools.psm1' # Version number of this module. ModuleVersion = '${project.version}' # Supported PSEditions # CompatiblePSEditions = @() # ID used to uniquely identify this module GUID = 'd5a9d8ac-5951-4a8d-9dec-2d5f47518e5b' # Author of this module Author = 'Rich Hickey' # Company or vendor of this module CompanyName = 'Rich Hickey' # Copyright statement for this module Copyright = '(c) Rich Hickey. All rights reserved.' # Description of the functionality provided by this module Description = 'Provides an unofficial Clojure tools install' # Minimum version of the PowerShell engine required by this module # PowerShellVersion = '' # Name of the PowerShell host required by this module # PowerShellHostName = '' # Minimum version of the PowerShell host required by this module # PowerShellHostVersion = '' # Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only. # DotNetFrameworkVersion = '' # Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only. # CLRVersion = '' # Processor architecture (None, X86, Amd64) required by this module # ProcessorArchitecture = '' # Modules that must be imported into the global environment prior to importing this module # RequiredModules = @() # Assemblies that must be loaded prior to importing this module # RequiredAssemblies = @() # Script files (.ps1) that are run in the caller's environment prior to importing this module. # ScriptsToProcess = @() # Type files (.ps1xml) to be loaded when importing this module # TypesToProcess = @() # Format files (.ps1xml) to be loaded when importing this module # FormatsToProcess = @() # Modules to import as nested modules of the module specified in RootModule/ModuleToProcess # NestedModules = @() # Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export. FunctionsToExport = 'Invoke-Clojure' # Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export. CmdletsToExport = @() # Variables to export from this module VariablesToExport = '*' # Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export. AliasesToExport = 'clj', 'clojure' # DSC resources to export from this module # DscResourcesToExport = @() # List of all modules packaged with this module # ModuleList = @() # List of all files packaged with this module FileList = 'deps.edn', 'example-deps.edn', 'exec.jar', 'clojure-tools-${project.version}.jar' # Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. PrivateData = @{ PSData = @{ # Tags applied to this module. These help with module discovery in online galleries. Tags = 'clojure' # A URL to the license for this module. LicenseUri = 'https://www.eclipse.org/legal/epl-v10.html' # A URL to the main website for this project. ProjectUri = 'https://github.com/clojure/brew-install' # A URL to an icon representing this module. # IconUri = '' # ReleaseNotes of this module # ReleaseNotes = '' } # End of PSData hashtable } # End of PrivateData hashtable # HelpInfo URI of this module # HelpInfoURI = '' # Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix. # DefaultCommandPrefix = '' } brew-install-1.12.0.1488/src/main/resources/clojure/install/ClojureTools.psm1000066400000000000000000000355461471772614100267140ustar00rootroot00000000000000function Get-StringHash($str) { $md5 = new-Object -TypeName System.Security.Cryptography.MD5CryptoServiceProvider $utf8 = new-object -TypeName System.Text.UTF8Encoding return [System.BitConverter]::ToString($md5.ComputeHash($utf8.GetBytes($str))) } function Test-NewerFile($file1, $file2) { if (!(Test-Path $file1)) { return $FALSE } if (!(Test-Path $file2)) { return $TRUE } $mod1 = (Get-ChildItem $file1).LastWriteTimeUtc $mod2 = (Get-ChildItem $file2).LastWriteTimeUtc return $mod1 -gt $mod2 } function Invoke-Clojure { $ErrorActionPreference = 'Stop' # Set dir containing the installed files $InstallDir = $PSScriptRoot $Version = '${project.version}' $ToolsCp = "$InstallDir\clojure-tools-$Version.jar" # Extract opts $PrintClassPath = $FALSE $Describe = $FALSE $Verbose = $FALSE $Trace = $FALSE $Force = $FALSE $Repro = $FALSE $Tree = $FALSE $Pom = $FALSE $Prep = $FALSE $Help = $FALSE $JvmOpts = @() $ReplAliases = @() $ClojureArgs = @() $Mode = "repl" $params = $args while ($params.Count -gt 0) { $arg, $params = $params if ($arg -ceq '-version') { Write-Error "Clojure CLI version $Version" return } elseif ($arg -ceq '--version') { Write-Output "Clojure CLI version $Version" return } elseif ($arg.StartsWith('-J')) { $JvmOpts += $arg.Substring(2) } elseif ($arg.StartsWith('-R')) { Write-Error "-R is no longer supported, use -A with repl, -M for main, -X for exec, -T for tool" return } elseif ($arg.StartsWith('-C')) { Write-Error "-C is no longer supported, use -A with repl, -M for main, -X for exec, -T for tool" return } elseif ($arg.StartsWith('-O')) { Write-Error "-O is no longer supported, use -A with repl, -M for main, -X for exec, -T for tool" return } elseif ($arg -ceq '-M') { $Mode = "main" $ClojureArgs += $params break } elseif ($arg -ceq '-M:') { $Mode = "main" $kw, $params = $params $MainAliases = ":$kw" $ClojureArgs += $params break } elseif ($arg -ceq '-T:') { $Mode = "tool" $kw, $params = $params $ToolAliases = ":$kw" $ClojureArgs += $params break } elseif ($arg -ceq '-T') { $Mode = "tool" $ClojureArgs += $params break } elseif ($arg.StartsWith('-T')) { $Mode = "tool" $ToolName = $arg.Substring(2) $ClojureArgs += $params break } elseif ($arg.StartsWith('-A')) { $aliases, $params = $params if ($aliases) { $ReplAliases += ":$aliases" } } elseif ($arg -ceq '-X') { $Mode = "exec" $ClojureArgs += $params break } elseif ($arg -ceq '-X:') { $Mode = "exec" $kw, $params = $params $ExecAliases = ":$kw" $ClojureArgs += $params break } elseif ($arg -ceq '-P') { $Prep = $TRUE } elseif ($arg -ceq '-Sdeps') { $DepsData, $params = $params } elseif ($arg -ceq '-Scp') { $ForceCP, $params = $params } elseif ($arg -ceq '-Spath') { $PrintClassPath = $TRUE } elseif ($arg -ceq '-Sverbose') { $Verbose = $TRUE } elseif ($arg -ceq '-Sthreads') { $Threads, $params = $params } elseif ($arg -ceq '-Strace') { $Trace = $TRUE } elseif ($arg -ceq '-Sdescribe') { $Describe = $TRUE } elseif ($arg -ceq '-Sforce') { $Force = $TRUE } elseif ($arg -ceq '-Srepro') { $Repro = $TRUE } elseif ($arg -ceq '-Stree') { $Tree = $TRUE } elseif ($arg -ceq '-Spom') { $Pom = $TRUE } elseif ($arg -ceq '-Sresolve-tags') { Write-Error "Option changed, use: clj -X:deps git-resolve-tags" return } elseif ($arg.StartsWith('-S')) { Write-Error "Invalid option: $arg" return } elseif ($arg -in '-h', '--help', '-?') { if ($MainAliases -or $AllAliases) { $ClojureArgs += $arg, $params break } else { $Help = $TRUE } } elseif ($arg -eq '--') { $ClojureArgs += $params break } else { $ClojureArgs += $arg, $params break } } # Find java executable $JavaCmd = (Get-Command java -ErrorAction SilentlyContinue).Path if (-not $JavaCmd) { $CandidateJavas = "$env:JAVA_HOME\bin\java.exe", "$env:JAVA_HOME\bin\java" $JavaCmd = $CandidateJavas | Where-Object { Test-Path $_ } | Select-Object -First 1 if (-not ($env:JAVA_HOME -and $JavaCmd)) { Write-Error "Couldn't find 'java'. Please set JAVA_HOME." return } } if($env:JAVA_OPTS) { $JavaOpts = $env:JAVA_OPTS.Split(" ") } else { $JavaOpts = @() } if($env:CLJ_JVM_OPTS) { $CljJvmOpts = $env:CLJ_JVM_OPTS.Split(" ") } else { $CljJvmOpts = @() } if ($Help) { Write-Host @' Version: ${project.version} You use the Clojure tools ('clj' or 'clojure') to run Clojure programs on the JVM, e.g. to start a REPL or invoke a specific function with data. The Clojure tools will configure the JVM process by defining a classpath (of desired libraries), an execution environment (JVM options) and specifying a main class and args. Using a deps.edn file (or files), you tell Clojure where your source code resides and what libraries you need. Clojure will then calculate the full set of required libraries and a classpath, caching expensive parts of this process for better performance. The internal steps of the Clojure tools, as well as the Clojure functions you intend to run, are parameterized by data structures, often maps. Shell command lines are not optimized for passing nested data, so instead you will put the data structures in your deps.edn file and refer to them on the command line via 'aliases' - keywords that name data structures. 'clj' and 'clojure' differ in that 'clj' has extra support for use as a REPL in a terminal, and should be preferred unless you don't want that support, then use 'clojure'. Usage: Start a REPL clj [clj-opt*] [-Aaliases] Exec fn(s) clojure [clj-opt*] -X[aliases] a/fn? [kpath v]* kv-map? Run tool clojure [clj-opt*] -T[name|aliases] a/fn [kpath v] kv-map? Run main clojure [clj-opt*] -M[aliases] [init-opt*] [main-opt] [arg*] Prepare clojure [clj-opt*] -P [other exec opts] exec-opts: -Aaliases Use concatenated aliases to modify classpath -X[aliases] Use concatenated aliases to modify classpath or supply exec fn/args -T[name|aliases] Invoke tool by name or via aliases ala -X -M[aliases] Use concatenated aliases to modify classpath or supply main opts -P Prepare deps - download libs, cache classpath, but don't exec clj-opts: -Jopt Pass opt through in java_opts, ex: -J-Xmx512m -Sdeps EDN Deps data to use as the final deps file -Spath Compute classpath and echo to stdout only -Stree Print dependency tree -Scp CP Do NOT compute or cache classpath, use this one instead -Srepro Use only the local deps.edn (ignore other config files) -Sforce Force recomputation of the classpath (don't use the cache) -Sverbose Print important path info to console -Sdescribe Print environment and command parsing info as data -Sthreads Set specific number of download threads -Strace Write a trace.edn file that traces deps expansion -- Stop parsing dep options and pass remaining arguments to clojure.main --version Print the version to stdout and exit -version Print the version to stderr and exit init-opt: -i, --init path Load a file or resource -e, --eval string Eval exprs in string; print non-nil values --report target Report uncaught exception to "file" (default), "stderr", or "none" main-opt: -m, --main ns-name Call the -main function from namespace w/args -r, --repl Run a repl path Run a script from a file or resource - Run a script from standard input -h, -?, --help Print this help message and exit Programs provided by :deps alias: -X:deps aliases List available aliases and their source -X:deps list List full transitive deps set and licenses -X:deps tree Print deps tree -X:deps find-versions Find available versions of a library -X:deps prep Prepare all unprepped libs in the dep tree -X:deps mvn-pom Generate (or update) pom.xml with deps and paths -X:deps mvn-install Install a maven jar to the local repository cache -X:deps git-resolve-tags Resolve git coord tags to shas and update deps.edn For more info, see: https://clojure.org/guides/deps_and_cli https://clojure.org/reference/repl_and_main '@ return } # Determine user config directory if ($env:CLJ_CONFIG) { $ConfigDir = $env:CLJ_CONFIG } elseif ($env:HOME) { $ConfigDir = "$env:HOME\.clojure" } else { $ConfigDir = "$env:USERPROFILE\.clojure" } # If user config directory does not exist, create it if (!(Test-Path "$ConfigDir")) { New-Item -Type Directory "$ConfigDir" | Out-Null } if (!(Test-Path "$ConfigDir\deps.edn")) { Copy-Item "$InstallDir\example-deps.edn" "$ConfigDir\deps.edn" } if (!(Test-Path "$ConfigDir\tools")) { New-Item -Type Directory "$ConfigDir\tools" | Out-Null } if (Test-NewerFile "$InstallDir\tools.edn" "$ConfigDir\tools\tools.edn") { Copy-Item "$InstallDir\tools.edn" "$ConfigDir\tools\tools.edn" } # Determine user cache directory if ($env:CLJ_CACHE) { $UserCacheDir = $env:CLJ_CACHE } else { $UserCacheDir = "$ConfigDir\.cpcache" } # Chain deps.edn in config paths. repro=skip config dir $ConfigProject='deps.edn' if ($Repro) { $ConfigPaths = "$InstallDir\deps.edn", 'deps.edn' } else { $ConfigUser = "$ConfigDir\deps.edn" $ConfigPaths = "$InstallDir\deps.edn", "$ConfigDir\deps.edn", 'deps.edn' } # Determine whether to use user or project cache if (Test-Path deps.edn) { $CacheDir = '.cpcache' if(!(Test-Path $CacheDir -PathType container)) { Try { New-Item -Name $CacheDir -ItemType "directory" } Catch { # fall back to user cache dir $CacheDirKey = Get-Location $CacheDir = $UserCacheDir } } } else { $CacheDir = $UserCacheDir } # Construct location of cached classpath file $CacheVersion = "5" $CacheKey = "$CacheVersion|$CacheDirKey|$($ReplAliases -join '')|$($JvmAliases -join '')|$ExecAliases|$MainAliases|$DepsData|$ToolName|$ToolAliases|$($ConfigPaths -join '|')" $CacheKeyHash = (Get-StringHash $CacheKey) -replace '-', '' $CpFile = "$CacheDir\$CacheKeyHash.cp" $JvmFile = "$CacheDir\$CacheKeyHash.jvm" $MainFile = "$CacheDir\$CacheKeyHash.main" $BasisFile = "$CacheDir\$CacheKeyHash.basis" $ManifestFile = "$CacheDir\$CacheKeyHash.manifest" # Print paths in verbose mode if ($Verbose) { Write-Output @" version = $Version install_dir = $InstallDir config_dir = $ConfigDir config_paths = $ConfigPaths cache_dir = $CacheDir cp_file = $CpFile "@ } # Check for stale classpath file $Stale = $FALSE if ($Force -or $Trace -or $Tree -or $Prep -or !(Test-Path $CpFile)) { $Stale = $TRUE } elseif ($ToolName -and (Test-NewerFile "$ConfigDir\tools\$ToolName.edn" "$CpFile" )) { $Stale = $TRUE } else { if ($ConfigPaths | Where-Object { Test-NewerFile $_ $CpFile }) { $Stale = $TRUE } if (Test-Path $ManifestFile) { $Manifests = @(Get-Content $ManifestFile) if ($Manifests | Where-Object { !(Test-Path $_) -or (Test-NewerFile $_ $CpFile) }) { $Stale = $TRUE } } } # Make tools args if needed if ($Stale -or $Pom) { $ToolsArgs = @() if ($DepsData) { $ToolsArgs += '--config-data' $ToolsArgs += $DepsData } if ($MainAliases) { $ToolsArgs += "-M$MainAliases" } if ($ReplAliases) { $ToolsArgs += "-A$($ReplAliases -join '')" } if ($ExecAliases) { $ToolsArgs += "-X$ExecAliases" } if ($Mode -ceq 'tool') { $ToolsArgs += "--tool-mode" } if ($ToolName) { $ToolsArgs += "--tool-name" $ToolsArgs += "$ToolName" } if ($ToolAliases) { $ToolsArgs += "-T$ToolAliases" } if ($ForceCp) { $ToolsArgs += '--skip-cp' } if ($Threads) { $ToolsArgs += '--threads' $ToolsArgs += $Threads } if ($Trace) { $ToolsArgs += '--trace' } if ($Tree) { $ToolsArgs += '--tree' } } # If stale, run make-classpath to refresh cached classpath if ($Stale -and (-not $Describe)) { if ($Verbose) { Write-Host "Refreshing classpath" } & $JavaCmd -XX:-OmitStackTraceInFastThrow @CljJvmOpts -classpath $ToolsCp clojure.main -m clojure.tools.deps.script.make-classpath2 --config-user $ConfigUser --config-project $ConfigProject --basis-file $BasisFile --cp-file $CpFile --jvm-file $JvmFile --main-file $MainFile --manifest-file $ManifestFile @ToolsArgs if ($LastExitCode -ne 0) { return } } if ($Describe) { $CP = '' } elseif ($ForceCp) { $CP = $ForceCp } else { $CP = Get-Content $CpFile } if ($Prep) { # Already done } elseif ($Pom) { & $JavaCmd -XX:-OmitStackTraceInFastThrow @CljJvmOpts -classpath $ToolsCp clojure.main -m clojure.tools.deps.script.generate-manifest2 --config-user $ConfigUser --config-project $ConfigProject --gen=pom @ToolsArgs } elseif ($PrintClassPath) { Write-Output $CP } elseif ($Describe) { $PathVector = ($ConfigPaths | ForEach-Object { "`"$($_.Replace("\","\\"))`"" }) -join ' ' Write-Output @" {:version "$Version" :config-files [$PathVector] :config-user "$($ConfigUser.Replace("\","\\"))" :config-project "$($ConfigProject.Replace("\","\\"))" :install-dir "$($InstallDir.Replace("\","\\"))" :config-dir "$($ConfigDir.Replace("\","\\"))" :cache-dir "$($CacheDir.Replace("\","\\"))" :force $(if ($Force) {"true"} else {"false"}) :repro $(if ($Repro) {"true"} else {"false"}) :main-aliases "$main_aliases" :repl-aliases "$repl_aliases" :exec-aliases "$exec_aliases"} "@ } elseif ($Tree) { # Already done } elseif ($Trace) { Write-Host "Wrote trace.edn" } else { if (Test-Path $JvmFile) { $JvmCacheOpts = @(Get-Content $JvmFile) } if (($Mode -eq 'exec') -or ($Mode -eq 'tool')) { & $JavaCmd -XX:-OmitStackTraceInFastThrow @JavaOpts @JvmCacheOpts @JvmOpts "-Dclojure.basis=$BasisFile" -classpath "$CP;$InstallDir/exec.jar" clojure.main -m clojure.run.exec @ClojureArgs } else { if (Test-Path $MainFile) { # TODO this seems dangerous $MainCacheOpts = @(Get-Content $MainFile) -replace '"', '\"' } if ($ClojureArgs.Count -gt 0 -and $Mode -eq 'repl') { Write-Warning "WARNING: Implicit use of clojure.main with options is deprecated, use -M" } & $JavaCmd -XX:-OmitStackTraceInFastThrow @JavaOpts @JvmCacheOpts @JvmOpts "-Dclojure.basis=$BasisFile" -classpath $CP clojure.main @MainCacheOpts @ClojureArgs } } } New-Alias -Name clj -Value Invoke-Clojure New-Alias -Name clojure -Value Invoke-Clojure brew-install-1.12.0.1488/src/main/resources/clojure/install/clj000077500000000000000000000003671471772614100241550ustar00rootroot00000000000000#!/usr/bin/env bash bin_dir=BINDIR if type -p rlwrap >/dev/null 2>&1; then exec rlwrap -m -r -q '\"' -b "(){}[],^%#@\";:'" "$bin_dir/clojure" "$@" else echo "Please install rlwrap for command editing or use \"clojure\" instead." exit 1 fi brew-install-1.12.0.1488/src/main/resources/clojure/install/clojure000077500000000000000000000325731471772614100250540ustar00rootroot00000000000000#!/usr/bin/env bash set -e install_dir=PREFIX version=${project.version} function join { local d=$1; shift; echo -n "$1"; shift; printf "%s" "${@/#/$d}"; } # Extract opts print_classpath=false describe=false verbose=false trace=false force=false repro=false tree=false pom=false help=false prep=false jvm_opts=() repl_aliases=() mode="repl" while [ $# -gt 0 ] do case "$1" in -version) >&2 echo "Clojure CLI version $version" exit 0 ;; --version) echo "Clojure CLI version $version" exit 0 ;; -J*) jvm_opts+=("${1:2}") shift ;; -R*) >&2 echo "-R is no longer supported, use -A with repl, -M for main, -X for exec, -T for tool" exit 1 ;; -C*) >&2 echo "-C is no longer supported, use -A with repl, -M for main, -X for exec, -T for tool" exit 1 ;; -O*) >&2 echo "-O is no longer supported, use -A with repl, -M for main, -X for exec, -T for tool" exit 1 ;; -A) >&2 echo "-A requires an alias" exit 1 ;; -A*) repl_aliases+=("${1:2}") shift ;; -M) mode="main" shift break ;; -M*) mode="main" main_aliases="${1:2}" shift break ;; -X) mode="exec" shift break ;; -X*) mode="exec" exec_aliases="${1:2}" shift break ;; -T:*) mode="tool" tool_aliases="${1:2}" shift break ;; -T*) mode="tool" tool_name="${1:2}" shift break ;; -T) mode="tool" shift break ;; -P) prep=true shift ;; -Sdeps) shift deps_data="${1}" shift ;; -Scp) shift force_cp="${1}" shift ;; -Spath) print_classpath=true shift ;; -Sverbose) verbose=true shift ;; -Sthreads) shift threads="${1}" shift ;; -Strace) trace=true shift ;; -Sdescribe) describe=true shift ;; -Sforce) force=true shift ;; -Srepro) repro=true shift ;; -Stree) tree=true shift ;; -Spom) pom=true shift ;; -Sresolve-tags) >&2 echo "Option changed, use: clj -X:deps git-resolve-tags" exit 1 ;; -S*) >&2 echo "Invalid option: $1" exit 1 ;; -h|--help|"-?") if [[ -n "$main_aliases" ]] || [[ ${#repl_aliases[@]} -gt 0 ]]; then break else help=true shift fi ;; --) shift break ;; *) break ;; esac done # Find java executable set +e JAVA_CMD=${JAVA_CMD:-$(type -p java)} set -e if [[ -z "$JAVA_CMD" ]]; then if [[ -n "$JAVA_HOME" ]] && [[ -x "$JAVA_HOME/bin/java" ]]; then JAVA_CMD="$JAVA_HOME/bin/java" else >&2 echo "Couldn't find 'java'. Please set JAVA_HOME." exit 1 fi fi if "$help"; then cat <<-END Version: $version You use the Clojure tools ('clj' or 'clojure') to run Clojure programs on the JVM, e.g. to start a REPL or invoke a specific function with data. The Clojure tools will configure the JVM process by defining a classpath (of desired libraries), an execution environment (JVM options) and specifying a main class and args. Using a deps.edn file (or files), you tell Clojure where your source code resides and what libraries you need. Clojure will then calculate the full set of required libraries and a classpath, caching expensive parts of this process for better performance. The internal steps of the Clojure tools, as well as the Clojure functions you intend to run, are parameterized by data structures, often maps. Shell command lines are not optimized for passing nested data, so instead you will put the data structures in your deps.edn file and refer to them on the command line via 'aliases' - keywords that name data structures. 'clj' and 'clojure' differ in that 'clj' has extra support for use as a REPL in a terminal, and should be preferred unless you don't want that support, then use 'clojure'. Usage: Start a REPL clj [clj-opt*] [-Aaliases] Exec fn(s) clojure [clj-opt*] -X[aliases] a/fn? [kpath v]* kv-map? Run tool clojure [clj-opt*] -T[name|aliases] a/fn [kpath v] kv-map? Run main clojure [clj-opt*] -M[aliases] [init-opt*] [main-opt] [arg*] Prepare clojure [clj-opt*] -P [other exec opts] exec-opts: -Aaliases Use concatenated aliases to modify classpath -X[aliases] Use concatenated aliases to modify classpath or supply exec fn/args -T[toolname|aliases] Invoke tool by name or via aliases ala -X -M[aliases] Use concatenated aliases to modify classpath or supply main opts -P Prepare deps - download libs, cache classpath, but don't exec clj-opts: -Jopt Pass opt through in java_opts, ex: -J-Xmx512m -Sdeps EDN Deps data to use as the last deps file to be merged -Spath Compute classpath and echo to stdout only -Stree Print dependency tree -Scp CP Do NOT compute or cache classpath, use this one instead -Srepro Ignore the ~/.clojure/deps.edn config file -Sforce Force recomputation of the classpath (don't use the cache) -Sverbose Print important path info to console -Sdescribe Print environment and command parsing info as data -Sthreads Set specific number of download threads -Strace Write a trace.edn file that traces deps expansion -- Stop parsing dep options and pass remaining arguments to clojure.main --version Print the version to stdout and exit -version Print the version to stderr and exit init-opt: -i, --init path Load a file or resource -e, --eval string Eval exprs in string; print non-nil values --report target Report uncaught exception to "file" (default), "stderr", or "none" main-opt: -m, --main ns-name Call the -main function from namespace w/args -r, --repl Run a repl path Run a script from a file or resource - Run a script from standard input -h, -?, --help Print this help message and exit Programs provided by :deps alias: -X:deps aliases List available aliases and their source -X:deps list List full transitive deps set and licenses -X:deps tree Print deps tree -X:deps find-versions Find available versions of a library -X:deps prep Prepare all unprepped libs in the dep tree -X:deps mvn-pom Generate (or update) pom.xml with deps and paths -X:deps mvn-install Install a maven jar to the local repository cache -X:deps git-resolve-tags Resolve git coord tags to shas and update deps.edn For more info, see: https://clojure.org/guides/deps_and_cli https://clojure.org/reference/repl_and_main END exit 0 fi # Set tools classpath used for the various programs before the user's program tools_cp="$install_dir/libexec/clojure-tools-$version.jar" # Determine user config directory if [[ -n "$CLJ_CONFIG" ]]; then config_dir="$CLJ_CONFIG" elif [[ -n "$XDG_CONFIG_HOME" ]]; then config_dir="$XDG_CONFIG_HOME/clojure" else config_dir="$HOME/.clojure" fi # If user config directory does not exist, create it if [[ ! -d "$config_dir" ]]; then mkdir -p "$config_dir" fi if [[ ! -e "$config_dir/deps.edn" ]]; then cp "$install_dir/example-deps.edn" "$config_dir/deps.edn" fi if [ "$install_dir/tools.edn" -nt "$config_dir/tools/tools.edn" ]; then mkdir -p "$config_dir/tools" cp "$install_dir/tools.edn" "$config_dir/tools/tools.edn" fi # Determine user cache directory if [[ -n "$CLJ_CACHE" ]]; then user_cache_dir="$CLJ_CACHE" elif [[ -n "$XDG_CACHE_HOME" ]]; then user_cache_dir="$XDG_CACHE_HOME/clojure" else user_cache_dir="$config_dir/.cpcache" fi # Chain deps.edn in config paths. repro=skip config dir config_project="deps.edn" if "$repro"; then config_paths=("$install_dir/deps.edn" "deps.edn") else config_user="$config_dir/deps.edn" config_paths=("$install_dir/deps.edn" "$config_dir/deps.edn" "deps.edn") fi # Determine whether to use user or project cache if [[ -f deps.edn ]]; then if [ -w "." ]; then cache_dir=.cpcache else # can't write to .cpcache cache_dir_key="$PWD" cache_dir="$user_cache_dir" fi else cache_dir="$user_cache_dir" fi # Construct location of cached classpath file cache_version=5 val="$cache_version|$cache_dir_key|$(join '' ${repl_aliases[@]})|$exec_aliases|$main_aliases|$deps_data|$tool_name|$tool_aliases" for config_path in "${config_paths[@]}"; do if [[ -f "$config_path" ]]; then val="$val|$config_path" else val="$val|NIL" fi done ck=$(echo "$val" | cksum | cut -d" " -f 1) cp_file="$cache_dir/$ck.cp" jvm_file="$cache_dir/$ck.jvm" main_file="$cache_dir/$ck.main" basis_file="$cache_dir/$ck.basis" manifest_file="$cache_dir/$ck.manifest" # Print paths in verbose mode if "$verbose"; then echo "version = $version" echo "install_dir = $install_dir" echo "config_dir = $config_dir" echo "config_paths =" "${config_paths[@]}" echo "cache_dir = $cache_dir" echo "cp_file = $cp_file" echo fi # Check for stale classpath file stale=false if "$force" || "$trace" || "$tree" || "$prep" || [ ! -f "$cp_file" ]; then stale=true elif [[ -n "$tool_name" ]] && [ "$config_dir/tools/$tool_name.edn" -nt "$cp_file" ]; then stale=true else # Are deps.edn files stale? for config_path in "${config_paths[@]}"; do if [ "$config_path" -nt "$cp_file" ]; then stale=true break fi done # Are .jar files in classpath missing? IFS=':' read -ra cp_entries <<<"$(cat $cp_file)" for cp_entry in "${cp_entries[@]}"; do if [[ "$cp_entry" == *.jar && ! -f "$cp_entry" ]]; then stale=true break fi done # Are manifest files in local/git deps stale? if [[ "$stale" = false && -f "$manifest_file" ]]; then set +e IFS=$'\n' read -ra manifest_files -d '' <"$manifest_file" set -e for manifest in "${manifest_files[@]}"; do if [[ ! -f "$manifest" || "$manifest" -nt "$cp_file" ]]; then stale=true break fi done fi fi # Make tools args if needed if "$stale" || "$pom"; then tools_args=() if [[ -n "$deps_data" ]]; then tools_args+=("--config-data" "$deps_data") fi if [[ -n "$main_aliases" ]]; then tools_args+=("-M$main_aliases") fi if [[ ${#repl_aliases[@]} -gt 0 ]]; then tools_args+=("-A$(join '' ${repl_aliases[@]})") fi if [[ -n "$exec_aliases" ]]; then tools_args+=("-X$exec_aliases") fi if [ "$mode" == "tool" ]; then tools_args+=("--tool-mode") fi if [[ -n "$tool_name" ]]; then tools_args+=("--tool-name" "$tool_name") fi if [[ -n "$tool_aliases" ]]; then tools_args+=("-T$tool_aliases") fi if [[ -n "$force_cp" ]]; then tools_args+=("--skip-cp") fi if [[ -n "$threads" ]]; then tools_args+=("--threads" "$threads") fi if "$trace"; then tools_args+=("--trace") fi if "$tree"; then tools_args+=("--tree") fi fi # If stale, run make-classpath to refresh cached classpath if [[ "$stale" = true && "$describe" = false ]]; then if "$verbose"; then >&2 echo "Refreshing classpath" fi "$JAVA_CMD" -XX:-OmitStackTraceInFastThrow $CLJ_JVM_OPTS -classpath "$tools_cp" clojure.main -m clojure.tools.deps.script.make-classpath2 --config-user "$config_user" --config-project "$config_project" --basis-file "$basis_file" --cp-file "$cp_file" --jvm-file "$jvm_file" --main-file "$main_file" --manifest-file "$manifest_file" "${tools_args[@]}" fi if "$describe"; then cp= elif [[ -n "$force_cp" ]]; then cp="$force_cp" else cp=$(cat "$cp_file") fi if "$prep"; then exit 0 elif "$pom"; then exec "$JAVA_CMD" -XX:-OmitStackTraceInFastThrow $CLJ_JVM_OPTS -classpath "$tools_cp" clojure.main -m clojure.tools.deps.script.generate-manifest2 --config-user "$config_user" --config-project "$config_project" --gen=pom "${tools_args[@]}" elif "$print_classpath"; then echo "$cp" elif "$describe"; then for config_path in "${config_paths[@]}"; do if [[ -f "$config_path" ]]; then path_vector="$path_vector\"$config_path\" " fi done cat <<-END {:version "$version" :config-files [$path_vector] :config-user "$config_user" :config-project "$config_project" :install-dir "$install_dir" :config-dir "$config_dir" :cache-dir "$cache_dir" :force $force :repro $repro :main-aliases "$main_aliases" :repl-aliases "${repl_aliases[@]}"} END elif "$tree"; then exit 0 elif "$trace"; then >&2 echo "Wrote trace.edn" else set -f if [[ -f "$jvm_file" ]]; then set +e IFS=$'\n' read -ra jvm_cache_opts -d '' <"$jvm_file" set -e fi if [ "$mode" == "tool" ] || [ "$mode" == "exec" ]; then exec "$JAVA_CMD" -XX:-OmitStackTraceInFastThrow $JAVA_OPTS "${jvm_cache_opts[@]}" "${jvm_opts[@]}" "-Dclojure.basis=$basis_file" -classpath "$cp:$install_dir/libexec/exec.jar" clojure.main -m clojure.run.exec "$@" else if [[ -f "$main_file" ]]; then set +e IFS=$'\n' read -ra main_cache_opts -d '' <"$main_file" set -e fi if [ "$#" -gt 0 ] && [ "$mode" == "repl" ]; then >&2 echo "WARNING: Implicit use of clojure.main with options is deprecated, use -M" fi exec "$JAVA_CMD" -XX:-OmitStackTraceInFastThrow $JAVA_OPTS "${jvm_cache_opts[@]}" "${jvm_opts[@]}" "-Dclojure.basis=$basis_file" -classpath "$cp" clojure.main "${main_cache_opts[@]}" "$@" fi fi brew-install-1.12.0.1488/src/main/resources/clojure/install/clojure.rb000066400000000000000000000012361471772614100254430ustar00rootroot00000000000000class Clojure < Formula desc "The Clojure Programming Language" homepage "https://clojure.org" url "https://github.com/clojure/brew-install/releases/download/${stable.version}/clojure-tools-${stable.version}.tar.gz" mirror "https://download.clojure.org/install/clojure-tools-${stable.version}.tar.gz" sha256 "${stable.sha}" license "EPL-1.0" depends_on "rlwrap" uses_from_macos "ruby" => :build def install system "./install.sh", prefix end test do ENV["TERM"] = "xterm" system("#{bin}/clj -M -e nil") %w[clojure clj].each do |clj| assert_equal "2", shell_output("#{bin}/#{clj} -M -e \"(+ 1 1)\"").strip end end end brew-install-1.12.0.1488/src/main/resources/clojure/install/clojure@version.rb000066400000000000000000000012511471772614100271460ustar00rootroot00000000000000class ClojureAT${version.short} < Formula desc "The Clojure Programming Language" homepage "https://clojure.org" url "https://github.com/clojure/brew-install/releases/download/${project.version}/clojure-tools-${project.version}.tar.gz" mirror "https://download.clojure.org/install/clojure-tools-${project.version}.tar.gz" sha256 "SHA" license "EPL-1.0" depends_on "rlwrap" uses_from_macos "ruby" => :build def install system "./install.sh", prefix end test do ENV["TERM"] = "xterm" system("#{bin}/clj -M -e nil") %w[clojure clj].each do |clj| assert_equal "2", shell_output("#{bin}/#{clj} -M -e \"(+ 1 1)\"").strip end end end brew-install-1.12.0.1488/src/main/resources/clojure/install/deps.edn000066400000000000000000000007511471772614100250770ustar00rootroot00000000000000{ :paths ["src"] :deps { org.clojure/clojure {:mvn/version "${clojure.version}"} } :aliases { :deps {:replace-paths [] :replace-deps {org.clojure/tools.deps.cli {:mvn/version "0.11.78"}} :ns-default clojure.tools.deps.cli.api :ns-aliases {help clojure.tools.deps.cli.help}} :test {:extra-paths ["test"]} } :mvn/repos { "central" {:url "https://repo1.maven.org/maven2/"} "clojars" {:url "https://repo.clojars.org/"} } } brew-install-1.12.0.1488/src/main/resources/clojure/install/example-deps.edn000066400000000000000000000000731471772614100265250ustar00rootroot00000000000000{ :aliases { ;; Add cross-project aliases here } } brew-install-1.12.0.1488/src/main/resources/clojure/install/install.sh000077500000000000000000000010451471772614100254560ustar00rootroot00000000000000#!/usr/bin/env bash prefix="$1" # default config file cp deps.edn "$prefix" cp example-deps.edn "$prefix" cp tools.edn "$prefix" # jar needed by scripts mkdir -p "$prefix/libexec" cp ./*.jar "$prefix/libexec" # scripts ${HOMEBREW_RUBY_PATH} -pi.bak -e "gsub(/PREFIX/, '$prefix')" clojure ${HOMEBREW_RUBY_PATH} -pi.bak -e "gsub(/BINDIR/, '$prefix/bin')" clj mkdir -p "$prefix/bin" cp clojure "$prefix/bin" cp clj "$prefix/bin" # man pages mkdir -p "$prefix/share/man/man1" cp clojure.1 "$prefix/share/man/man1" cp clj.1 "$prefix/share/man/man1" brew-install-1.12.0.1488/src/main/resources/clojure/install/linux-install.sh000077500000000000000000000035621471772614100266210ustar00rootroot00000000000000#!/usr/bin/env bash set -euo pipefail # Start do_usage() { echo "Installs the Clojure command line tools." echo -e echo "Usage:" echo "linux-install.sh [-p|--prefix ]" exit 1 } default_prefix_dir="/usr/local" # use getopt if the number of params grows prefix_dir=$default_prefix_dir prefix_param=${1:-} prefix_value=${2:-} if [[ "$prefix_param" = "-p" || "$prefix_param" = "--prefix" ]]; then if [[ -z "$prefix_value" ]]; then do_usage else prefix_dir="$prefix_value" fi fi echo "Downloading and expanding tar" curl -L -O https://github.com/clojure/brew-install/releases/download/${project.version}/clojure-tools-${project.version}.tar.gz tar xzf clojure-tools-${project.version}.tar.gz lib_dir="$prefix_dir/lib" bin_dir="$prefix_dir/bin" man_dir="$prefix_dir/share/man/man1" clojure_lib_dir="$lib_dir/clojure" echo "Installing libs into $clojure_lib_dir" mkdir -p $bin_dir $man_dir $clojure_lib_dir/libexec install -m644 clojure-tools/deps.edn "$clojure_lib_dir/deps.edn" install -m644 clojure-tools/example-deps.edn "$clojure_lib_dir/example-deps.edn" install -m644 clojure-tools/tools.edn "$clojure_lib_dir/tools.edn" install -m644 clojure-tools/exec.jar "$clojure_lib_dir/libexec/exec.jar" install -m644 clojure-tools/clojure-tools-${project.version}.jar "$clojure_lib_dir/libexec/clojure-tools-${project.version}.jar" echo "Installing clojure and clj into $bin_dir" sed -i -e 's@PREFIX@'"$clojure_lib_dir"'@g' clojure-tools/clojure sed -i -e 's@BINDIR@'"$bin_dir"'@g' clojure-tools/clj install -m755 clojure-tools/clojure "$bin_dir/clojure" install -m755 clojure-tools/clj "$bin_dir/clj" echo "Installing man pages into $man_dir" install -m644 clojure-tools/clojure.1 "$man_dir/clojure.1" install -m644 clojure-tools/clj.1 "$man_dir/clj.1" echo "Removing download" rm -rf clojure-tools rm -rf clojure-tools-${project.version}.tar.gz echo "Use clj -h for help." brew-install-1.12.0.1488/src/main/resources/clojure/install/posix-install.sh000077500000000000000000000037331471772614100266240ustar00rootroot00000000000000#!/bin/sh set -eu # Start do_usage() { echo "Installs the Clojure command line tools." echo -e echo "Usage:" echo "posix-install.sh [-p|--prefix ]" exit 1 } default_prefix_dir="/usr/local" # use getopt if the number of params grows prefix_dir=$default_prefix_dir prefix_param=${1:-} prefix_value=${2:-} if [ "$prefix_param" = "-p" -o "$prefix_param" = "--prefix" ]; then if [ -z "$prefix_value" ]; then do_usage else prefix_dir="$prefix_value" fi fi echo "Downloading and expanding tar" curl -L -O https://github.com/clojure/brew-install/releases/download/${project.version}/clojure-tools-${project.version}.tar.gz tar xzf clojure-tools-${project.version}.tar.gz lib_dir="$prefix_dir/lib" bin_dir="$prefix_dir/bin" man_dir="$prefix_dir/share/man/man1" clojure_lib_dir="$lib_dir/clojure" echo "Installing libs into $clojure_lib_dir" mkdir -p $bin_dir $man_dir $clojure_lib_dir/libexec do_install() { local mode="$1" local src="$2" local dest="$3" cp "$src" "$dest" chmod "$mode" "$dest" } do_install 644 clojure-tools/deps.edn "$clojure_lib_dir/deps.edn" do_install 644 clojure-tools/example-deps.edn "$clojure_lib_dir/example-deps.edn" do_install 644 clojure-tools/tools.edn "$clojure_lib_dir/tools.edn" do_install 644 clojure-tools/exec.jar "$clojure_lib_dir/libexec/exec.jar" do_install 644 clojure-tools/clojure-tools-${project.version}.jar "$clojure_lib_dir/libexec/clojure-tools-${project.version}.jar" echo "Installing clojure and clj into $bin_dir" sed -i -e 's@PREFIX@'"$clojure_lib_dir"'@g' clojure-tools/clojure sed -i -e 's@BINDIR@'"$bin_dir"'@g' clojure-tools/clj do_install 755 clojure-tools/clojure "$bin_dir/clojure" do_install 755 clojure-tools/clj "$bin_dir/clj" echo "Installing man pages into $man_dir" do_install 644 clojure-tools/clojure.1 "$man_dir/clojure.1" do_install 644 clojure-tools/clj.1 "$man_dir/clj.1" echo "Removing download" rm -rf clojure-tools rm -rf clojure-tools-${project.version}.tar.gz echo "Use clj -h for help." brew-install-1.12.0.1488/src/main/resources/clojure/install/tools.edn000066400000000000000000000001761471772614100253050ustar00rootroot00000000000000{:lib io.github.clojure/tools.tools :coord {:git/tag "v0.3.4" :git/sha "0e9e6c8b409ac916ad6f2ec5bc075bbcb09545c0"}} brew-install-1.12.0.1488/src/main/resources/clojure/install/win-install.ps1000077500000000000000000000025571471772614100263530ustar00rootroot00000000000000#!/usr/bin/env pwsh $ErrorActionPreference = 'Stop' $ProgressPreference = 'SilentlyContinue' $Version = '${project.version}' $ClojureToolsUrl = "https://github.com/clojure/brew-install/releases/download/$Version/clojure-tools.zip" Write-Host 'Downloading Clojure tools' -ForegroundColor Gray [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]'Tls12' Invoke-WebRequest -Uri $ClojureToolsUrl -OutFile clojure-tools.zip Write-Warning 'Clojure will install as a module in your PowerShell module path.' Write-Host '' Write-Host 'Possible install locations:' $InstallLocations = $env:PSModulePath -split [IO.Path]::PathSeparator for ($Index = 0; $Index -lt $InstallLocations.Length; $Index++) { Write-Host (' {0}) {1}' -f ($Index + 1), $InstallLocations[$Index]) } $Choice = Read-Host 'Enter number of preferred install location' $DestinationPath = $InstallLocations[$Choice - 1] Write-Host '' $ExistingLocation = "$DestinationPath\ClojureTools" if (Test-Path $ExistingLocation) { Write-Host 'Cleaning up existing install' -ForegroundColor Gray Remove-Item -Path $ExistingLocation -Recurse } Write-Host 'Installing PowerShell module' Expand-Archive clojure-tools.zip -DestinationPath $DestinationPath Write-Host 'Removing download' Remove-Item clojure-tools.zip Write-Host 'Clojure now installed. Use "clj -h" for help.' -ForegroundColor Green brew-install-1.12.0.1488/src/test/000077500000000000000000000000001471772614100163615ustar00rootroot00000000000000brew-install-1.12.0.1488/src/test/clojure/000077500000000000000000000000001471772614100200245ustar00rootroot00000000000000brew-install-1.12.0.1488/src/test/clojure/clojure/000077500000000000000000000000001471772614100214675ustar00rootroot00000000000000brew-install-1.12.0.1488/src/test/clojure/clojure/run/000077500000000000000000000000001471772614100222735ustar00rootroot00000000000000brew-install-1.12.0.1488/src/test/clojure/clojure/run/test_exec.clj000066400000000000000000000127511471772614100247560ustar00rootroot00000000000000(ns clojure.run.test-exec (:require [clojure.edn :as edn] [clojure.test :refer :all] [clojure.string :as str] [clojure.run.exec :as exec] clojure.set) (:import [java.io File] [clojure.lang ExceptionInfo])) (defn submap? "Is m1 a subset of m2?" [m1 m2] (if (and (map? m1) (map? m2)) (every? (fn [[k v]] (and (contains? m2 k) (submap? v (get m2 k)))) m1) (= m1 m2))) (deftest test-read-args (is (= [] (#'exec/read-args []))) (is (= ['a [1 2] :k] (#'exec/read-args ["a" "[1 2]" ":k"]))) ;; unreadable arg message contains the bad value (is (thrown-with-msg? ExceptionInfo #":::a" (#'exec/read-args [":::a"])))) (deftest test-parse-fn (are [expected args] (= expected (#'exec/parse-fn args)) nil [] {:function 'foo/bar} ['foo/bar] {:overrides [:x 1 :y 1]} [:x 1 :y 1] {:function 'foo} ['foo] {:function 'foo :overrides [:x 1 :y 1]} ['foo :x 1 :y 1] {:overrides [:x 1 :y 1]} [:x 1 :y 1] {:overrides [:a 1 :b 2], :trailing {:b 42}} [:a 1 :b 2 {:b 42}] {:function 'foo/bar, :trailing {:a 1}} ['foo/bar {:a 1}] {:overrides [:x 1 :k 1], :trailing {:a 1}} [:x 1 :k 1 {:a 1}] {:function 'foo/bar, :overrides [:x 1 :y 2], :trailing {:y 42}} ['foo/bar :x 1 :y 2 {:y 42}]) ;; missing last override value prints value missing for key (like hash-map) (is (thrown-with-msg? ExceptionInfo #":y" (#'exec/parse-fn [:x 1 :y]))) ) (deftest test-qualify-fn (are [expected sym aliases default] (= expected (#'exec/qualify-fn sym aliases default)) 'a/b 'a/b nil nil 'a/b 'b nil 'a 'a/b 'my-alias/b {'my-alias 'a} nil) ;; function is not a symbol (is (thrown-with-msg? ExceptionInfo #"100" (#'exec/qualify-fn 100 nil nil))) ;; unqualified, no default-ns (is (thrown-with-msg? ExceptionInfo #"my-sym" (#'exec/qualify-fn 'my-sym nil nil)))) (def stash (atom nil)) (defn save [val] (reset! stash val)) (defn- encapsulate-main-with-effect [exec-args args] (let [fake-basis (File/createTempFile "basis" nil)] (save nil) (.deleteOnExit fake-basis) (binding [*print-namespace-maps* false] (spit fake-basis (pr-str {:argmap exec-args})) (System/setProperty "clojure.basis" (.getAbsolutePath fake-basis))) (binding [exec/*exit* (constantly nil)] (apply exec/-main args)) @stash)) (defn puppet [{:keys [ret err print-val print-val-err]}] (when print-val (print print-val) (flush)) (when print-val-err (binding [*out* *err*] (print print-val-err) (flush))) (if err (throw (RuntimeException. err)) ret)) (defn- encapsulate-invoke [exec-args args] (let [fake-basis (File/createTempFile "basis" nil)] (.deleteOnExit fake-basis) (binding [*print-namespace-maps* false] (spit fake-basis (pr-str {:argmap exec-args})) (System/setProperty "clojure.basis" (.getAbsolutePath fake-basis))) (binding [exec/*exit* (constantly nil)] (edn/read-string (with-out-str (apply exec/-main args)))))) (defmacro with-err-str "Evaluates exprs in a context in which *err* is bound to a fresh StringWriter. Returns the string created by any nested printing calls." {:added "1.0"} [& body] `(let [s# (new java.io.StringWriter)] (binding [*err* s#] ~@body (str s#)))) (deftest test-main (are [stashed args exec-args] (= stashed (encapsulate-main-with-effect exec-args args)) ;; ad hoc, fully resolved, with both key and path vector {:a 1, :b {:c 2}} ["clojure.run.test-exec/save" ":a" "1" "[:b,:c]" "2"] {} ;; ad hoc, resolved by default-ns {:a 1} ["save" ":a" "1"] {:ns-default 'clojure.run.test-exec} ;; ad hoc, resolved alias {:a 1} ["a/save" ":a" "1"] {:ns-aliases {'a 'clojure.run.test-exec}} ;; exec-fn with overrides {:a 1, :b 2} [":b" "2"] {:exec-fn 'clojure.run.test-exec/save :exec-args {:a 1 :b 1}} ;; exec-fn resolved by :ns-default, aliased exec-args {:a 1, :b 1} [] {:exec-fn 'save, :exec-args {:a 1, :b 1} :ns-default 'clojure.run.test-exec}) (are [return args exec-args] (submap? return (encapsulate-invoke exec-args (map pr-str args))) ;; non-map return, note that val is stringified! {:tag :ret, :val "42"} ['clojure.run.test-exec/puppet {:clojure.exec/invoke :fn, :ret 42}] {} ;; map return {:tag :ret, :val "{:a \"1\"}"} ['clojure.run.test-exec/puppet {:clojure.exec/invoke :fn, :ret {:a "1"}}] {} ;; capture out {:tag :ret :val "42" :out "hi there"} ['clojure.run.test-exec/puppet {:clojure.exec/invoke :fn, :ret 42, :print-val "hi there", :clojure.exec/out :capture}] {} ;; capture err {:tag :ret :val "42" :err "hi there"} ['clojure.run.test-exec/puppet {:clojure.exec/invoke :fn, :ret 42, :print-val-err "hi there", :clojure.exec/err :capture}] {}) (let [res (encapsulate-invoke {} (map pr-str ['clojure.run.test-exec/puppet {:clojure.exec/invoke :fn, :err "msg"}]))] (is (= :err (:tag res))) (is (str/starts-with? (:val res) "{:via [{:type java.lang.RuntimeException, :message \"msg\""))) ;; missing override val: "Key is missing value: :foo\n" (is (str/includes? (with-err-str (encapsulate-main-with-effect {} [":foo"])) ":foo")) ;; no function: "No function found on command line or in :exec-fn\n" (is (str/includes? (with-err-str (encapsulate-main-with-effect {} [])) "No function")) ;; unqualified function: "Unqualified function can't be resolved: foo\n" (is (str/includes? (with-err-str (encapsulate-main-with-effect {} ["foo"])) "foo")) ) (comment (test-main) )brew-install-1.12.0.1488/stable.properties000066400000000000000000000001151471772614100202000ustar00rootroot000000000000001.12.0.1479 2a515c45755df1edf378fdfafb380251c7736de2db15f7dbe55ed7295f0d296c