Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include :jar-exclusions in fingerprints #95

Merged
merged 6 commits into from
Apr 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file, which
follows the conventions of [keepachangelog.com](http://keepachangelog.com/).
This project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]

### Fixed
- Subproject fingerprints now include `:jar-exclusions` in the calculation.
[#95](https://github.com/amperity/lein-monolith/pull/95)

## [1.9.0] - 2023-12-07

Expand Down Expand Up @@ -342,7 +347,8 @@ instead of loading them all before running any commands.
Initial project release


[Unreleased]: https://github.com/amperity/lein-monolith/compare/1.8.0...HEAD
[Unreleased]: https://github.com/amperity/lein-monolith/compare/1.9.0...HEAD
[1.9.0]: https://github.com/amperity/lein-monolith/compare/1.8.0...1.9.0
[1.8.0]: https://github.com/amperity/lein-monolith/compare/1.7.1...1.8.0
[1.7.1]: https://github.com/amperity/lein-monolith/compare/1.7.0...1.7.1
[1.7.0]: https://github.com/amperity/lein-monolith/compare/1.6.1...1.7.0
Expand Down
2 changes: 1 addition & 1 deletion example/project.clj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"version++" ["version+"]}

:plugins
[[lein-monolith "1.9.0"]
[[lein-monolith "1.9.1-SNAPSHOT"]
[lein-pprint "1.2.0"]]

:dependencies
Expand Down
2 changes: 1 addition & 1 deletion project.clj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(defproject lein-monolith "1.9.0"
(defproject lein-monolith "1.9.1-SNAPSHOT"
:description "Leiningen plugin for managing subrojects within a monorepo."
:url "https://github.com/amperity/lein-monolith"
:license {:name "Apache License 2.0"
Expand Down
14 changes: 14 additions & 0 deletions src/lein_monolith/task/fingerprint.clj
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,17 @@
(dep-map (dep/project-name project))))


(defn- hash-jar-exclusions
[project]
(kv-hash
:jar-exclusions
(into
{}
(map (fn [[profile-key profile]]
[profile-key (pr-str (:jar-exclusions profile))]))
(assoc (:profiles project) ::default project))))


(defn- hash-inputs
"Hashes each of a project's inputs, and returns a map containing each individual
result, so it's easier to explain what aspect of a project caused its overall
Expand All @@ -217,6 +228,7 @@
prints
{::version (str (:version project))
::java-version (System/getProperty "java.version")
::jar-exclusions (hash-jar-exclusions project)
::seed (str (:monolith/fingerprint-seed project 0))
::sources (hash-sources project)
::deps (hash-dependencies project)
Expand Down Expand Up @@ -325,6 +337,7 @@
::sources
::deps
::java-version
::jar-exclusions
::upstream])


Expand All @@ -333,6 +346,7 @@
::new-project ["is a new project" "are new projects" :red]
::version ["has a different version" "have different versions" :red]
::java-version ["has a different java version" "have different java versions" :red]
::jar-exclusions ["has different JAR exclusions" "have different JAR exclusions" :yellow]
::seed ["has a different seed" "have different seeds" :yellow]
::sources ["has updated sources" "have updated sources" :red]
::deps ["has updated external dependencies" "have updated external dependencies" :yellow]
Expand Down