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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hack for reactor reduction #1406

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft

Conversation

cstamas
Copy link
Member

@cstamas cstamas commented Feb 8, 2024

This is just a hack, to test my theory. And it makes issue of the reproducer gone, it is working "as expected" and is not broken.
https://lists.apache.org/thread/sgcqyz5trxngxb7r64hjnccb8btxhbrl

This PR makes the reproducer "work as expected", but is a hack. It produces output as this:
https://gist.github.com/cstamas/ac44420f45b8f3e0a4d1ff285ff7bbde

So, module-a is reported as "built", despite being skipped. But the build time of 0.017s is telling 馃槃 that really nothing happened, but just skipped. Again: this is a hack, not a fix.


full output of the build when using this PR
https://gist.github.com/cstamas/81eaba944d6ffe695c6ed2a35a8b6d7f

@cstamas cstamas requested a review from gnodet February 8, 2024 10:01
@cstamas cstamas self-assigned this Feb 8, 2024
@@ -182,6 +183,18 @@ public class MavenProject implements Cloneable {

private final Set<String> lifecyclePhases = Collections.synchronizedSet(new LinkedHashSet<>());

private final AtomicBoolean projectNeedsBuild = new AtomicBoolean(true);
Copy link
Contributor

Choose a reason for hiding this comment

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

this should only be set at the beginning, why using an AtomicBoolean ?

Copy link
Member Author

Choose a reason for hiding this comment

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

I wanted just to ensure that "transition" from true->false can happen only once, and there is no way to "reset" it

Copy link
Member Author

Choose a reason for hiding this comment

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

Again, this is just a hack to prove my theory, this flag is omitted from clone etc...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants