You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "cstamas (via GitHub)" <gi...@apache.org> on 2024/06/05 10:58:02 UTC
[PR] [MNG-8140] Always tell why model was discarded as "invalid" [maven]
cstamas opened a new pull request, #1555:
URL: https://github.com/apache/maven/pull/1555
The info is there, but we redirect user to rinse-repeat in debug mode, that that creates a TON of output.
All is there, just tell why.
---
https://issues.apache.org/jira/browse/MNG-8140
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [MNG-8140] Always tell why model was discarded as "invalid" [maven]
Posted by "cstamas (via GitHub)" <gi...@apache.org>.
cstamas commented on code in PR #1555:
URL: https://github.com/apache/maven/pull/1555#discussion_r1630034144
##########
maven-core/src/main/java/org/apache/maven/internal/aether/LoggingRepositoryListener.java:
##########
@@ -96,12 +96,7 @@ public void artifactDescriptorInvalid(RepositoryEvent event) {
buffer.append("The POM for ");
buffer.append(event.getArtifact());
buffer.append(" is invalid, transitive dependencies (if any) will not be available");
-
- if (logger.isDebugEnabled()) {
- logger.warn(buffer + ": " + event.getException().getMessage());
- } else {
- logger.warn(buffer + ", enable debug logging for more details");
- }
+ logger.warn(buffer + ": " + event.getException().getMessage());
Review Comment:
WDYM "even in debug level"? This listener is triggered when there is invalid model reported... stack trace WHERE is totally irrelevant, it is much much import WHY and WHICH model was invalid.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [MNG-8140] Always tell why model was discarded as "invalid" [maven]
Posted by "cstamas (via GitHub)" <gi...@apache.org>.
cstamas commented on PR #1555:
URL: https://github.com/apache/maven/pull/1555#issuecomment-2153041468
ITs passed
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [MNG-8140] Always tell why model was discarded as "invalid" [maven]
Posted by "cstamas (via GitHub)" <gi...@apache.org>.
cstamas commented on code in PR #1555:
URL: https://github.com/apache/maven/pull/1555#discussion_r1630040851
##########
maven-core/src/main/java/org/apache/maven/internal/aether/LoggingRepositoryListener.java:
##########
@@ -96,12 +96,7 @@ public void artifactDescriptorInvalid(RepositoryEvent event) {
buffer.append("The POM for ");
buffer.append(event.getArtifact());
buffer.append(" is invalid, transitive dependencies (if any) will not be available");
-
- if (logger.isDebugEnabled()) {
- logger.warn(buffer + ": " + event.getException().getMessage());
- } else {
- logger.warn(buffer + ", enable debug logging for more details");
- }
+ logger.warn(buffer + ": " + event.getException().getMessage());
Review Comment:
In mean, it other words we _know_ from where even comes: from model builder and will always come from model builder as this event is triggered from it when it reports invalid model. So zero information (or zero value) has the stack trace.
##########
maven-core/src/main/java/org/apache/maven/internal/aether/LoggingRepositoryListener.java:
##########
@@ -96,12 +96,7 @@ public void artifactDescriptorInvalid(RepositoryEvent event) {
buffer.append("The POM for ");
buffer.append(event.getArtifact());
buffer.append(" is invalid, transitive dependencies (if any) will not be available");
-
- if (logger.isDebugEnabled()) {
- logger.warn(buffer + ": " + event.getException().getMessage());
- } else {
- logger.warn(buffer + ", enable debug logging for more details");
- }
+ logger.warn(buffer + ": " + event.getException().getMessage());
Review Comment:
In mean, it other words we _know_ from where it comes: from model builder and will always come from model builder as this event is triggered from it when it reports invalid model. So zero information (or zero value) has the stack trace.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [MNG-8140] Always tell why model was discarded as "invalid" [maven]
Posted by "cstamas (via GitHub)" <gi...@apache.org>.
cstamas commented on code in PR #1555:
URL: https://github.com/apache/maven/pull/1555#discussion_r1630034144
##########
maven-core/src/main/java/org/apache/maven/internal/aether/LoggingRepositoryListener.java:
##########
@@ -96,12 +96,7 @@ public void artifactDescriptorInvalid(RepositoryEvent event) {
buffer.append("The POM for ");
buffer.append(event.getArtifact());
buffer.append(" is invalid, transitive dependencies (if any) will not be available");
-
- if (logger.isDebugEnabled()) {
- logger.warn(buffer + ": " + event.getException().getMessage());
- } else {
- logger.warn(buffer + ", enable debug logging for more details");
- }
+ logger.warn(buffer + ": " + event.getException().getMessage());
Review Comment:
WDYM "even in debug level"? This listener is triggered when there is invalid model reported... stack trace WHERE (in Maven core) is totally irrelevant, it is much much import WHY and WHICH model was invalid.
##########
maven-core/src/main/java/org/apache/maven/internal/aether/LoggingRepositoryListener.java:
##########
@@ -96,12 +96,7 @@ public void artifactDescriptorInvalid(RepositoryEvent event) {
buffer.append("The POM for ");
buffer.append(event.getArtifact());
buffer.append(" is invalid, transitive dependencies (if any) will not be available");
-
- if (logger.isDebugEnabled()) {
- logger.warn(buffer + ": " + event.getException().getMessage());
- } else {
- logger.warn(buffer + ", enable debug logging for more details");
- }
+ logger.warn(buffer + ": " + event.getException().getMessage());
Review Comment:
WDYM "even in debug level"? This listener is triggered when there is invalid model reported... stack trace WHERE (in Maven core) is totally irrelevant, it is much much important WHY and WHICH model was invalid.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [MNG-8140] Always tell why model was discarded as "invalid" [maven]
Posted by "cstamas (via GitHub)" <gi...@apache.org>.
cstamas commented on PR #1555:
URL: https://github.com/apache/maven/pull/1555#issuecomment-2149622982
Lol, 2 ITs failed, one was due this PR that immediately revealed this issue: parent POM has no pom packaging (btw, fixed on master as mvn4 also spotted this):
https://github.com/apache/maven-integration-testing/blob/maven-3.9.x/core-it-suite/src/test/resources/mng-7819-file-locking-with-snapshots/repo/org/apache/maven/its/mng7819/parent/1.0.0-SNAPSHOT/parent-1.0.0-20221014.203717-12.pom
And the IT simply assert there are no unwanted level output in logs. I bet something similar happens in other failed IT.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [MNG-8140] Always tell why model was discarded as "invalid" [maven]
Posted by "michael-o (via GitHub)" <gi...@apache.org>.
michael-o commented on code in PR #1555:
URL: https://github.com/apache/maven/pull/1555#discussion_r1629950634
##########
maven-core/src/main/java/org/apache/maven/internal/aether/LoggingRepositoryListener.java:
##########
@@ -96,12 +96,7 @@ public void artifactDescriptorInvalid(RepositoryEvent event) {
buffer.append("The POM for ");
buffer.append(event.getArtifact());
buffer.append(" is invalid, transitive dependencies (if any) will not be available");
-
- if (logger.isDebugEnabled()) {
- logger.warn(buffer + ": " + event.getException().getMessage());
- } else {
- logger.warn(buffer + ", enable debug logging for more details");
- }
+ logger.warn(buffer + ": " + event.getException().getMessage());
Review Comment:
Maybe one should probe if debug is enabled and pass `e` otherwise?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [MNG-8140] Always tell why model was discarded as "invalid" [maven]
Posted by "cstamas (via GitHub)" <gi...@apache.org>.
cstamas commented on code in PR #1555:
URL: https://github.com/apache/maven/pull/1555#discussion_r1630024252
##########
maven-core/src/main/java/org/apache/maven/internal/aether/LoggingRepositoryListener.java:
##########
@@ -96,12 +96,7 @@ public void artifactDescriptorInvalid(RepositoryEvent event) {
buffer.append("The POM for ");
buffer.append(event.getArtifact());
buffer.append(" is invalid, transitive dependencies (if any) will not be available");
-
- if (logger.isDebugEnabled()) {
- logger.warn(buffer + ": " + event.getException().getMessage());
- } else {
- logger.warn(buffer + ", enable debug logging for more details");
- }
+ logger.warn(buffer + ": " + event.getException().getMessage());
Review Comment:
I don't want to _increase_ output, I want to make it more useful :stuck_out_tongue:
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [MNG-8140] Always tell why model was discarded as "invalid" [maven]
Posted by "michael-o (via GitHub)" <gi...@apache.org>.
michael-o commented on code in PR #1555:
URL: https://github.com/apache/maven/pull/1555#discussion_r1630041413
##########
maven-core/src/main/java/org/apache/maven/internal/aether/LoggingRepositoryListener.java:
##########
@@ -96,12 +96,7 @@ public void artifactDescriptorInvalid(RepositoryEvent event) {
buffer.append("The POM for ");
buffer.append(event.getArtifact());
buffer.append(" is invalid, transitive dependencies (if any) will not be available");
-
- if (logger.isDebugEnabled()) {
- logger.warn(buffer + ": " + event.getException().getMessage());
- } else {
- logger.warn(buffer + ", enable debug logging for more details");
- }
+ logger.warn(buffer + ": " + event.getException().getMessage());
Review Comment:
Makes sense.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [MNG-8140] Always tell why model was discarded as "invalid" [maven]
Posted by "cstamas (via GitHub)" <gi...@apache.org>.
cstamas commented on PR #1555:
URL: https://github.com/apache/maven/pull/1555#issuecomment-2149508687
This is how with this the reproducer for JavaFX "broken parent" case looks like:
https://gist.github.com/cstamas/288a773459ef026e1500699b7a109451
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [MNG-8140] Always tell why model was discarded as "invalid" [maven]
Posted by "michael-o (via GitHub)" <gi...@apache.org>.
michael-o commented on code in PR #1555:
URL: https://github.com/apache/maven/pull/1555#discussion_r1630027061
##########
maven-core/src/main/java/org/apache/maven/internal/aether/LoggingRepositoryListener.java:
##########
@@ -96,12 +96,7 @@ public void artifactDescriptorInvalid(RepositoryEvent event) {
buffer.append("The POM for ");
buffer.append(event.getArtifact());
buffer.append(" is invalid, transitive dependencies (if any) will not be available");
-
- if (logger.isDebugEnabled()) {
- logger.warn(buffer + ": " + event.getException().getMessage());
- } else {
- logger.warn(buffer + ", enable debug logging for more details");
- }
+ logger.warn(buffer + ": " + event.getException().getMessage());
Review Comment:
Even in debug level?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [MNG-8140] Always tell why model was discarded as "invalid" [maven]
Posted by "cstamas (via GitHub)" <gi...@apache.org>.
cstamas merged PR #1555:
URL: https://github.com/apache/maven/pull/1555
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org