Skip to content

fix: CU-2377 scip-go is logging errors that should be classified as warnings#178

Open
chrapkowski-sg wants to merge 1 commit intomainfrom
cu-2377-scip-go-is-logging
Open

fix: CU-2377 scip-go is logging errors that should be classified as warnings#178
chrapkowski-sg wants to merge 1 commit intomainfrom
cu-2377-scip-go-is-logging

Conversation

@chrapkowski-sg
Copy link

@chrapkowski-sg chrapkowski-sg commented Feb 4, 2026

Changes log.Error to log.Warn for two conditions in the package loader that are recoverable edge cases with explicit fallbacks, not actual errors:

  • Unknown version for userland package - When a package lacks an explicit version and isn't the main module, we set a fallback version "." and continue normally.
  • Unable to extract revision from pseudo-version - When parsing a pseudo-version fails, we use the original version and continue.

Both conditions have graceful fallbacks and don't indicate failures. Logging them as ERROR was misleading and noisy in production logs.

I removed ErrOrPanic call since we do not do this in other places where we log a warn for example

log.Warn("No target patterns provided using default './...'")

@chrapkowski-sg
Copy link
Author

This change is part of the following stack:

Change managed by git-spice.

@chrapkowski-sg chrapkowski-sg changed the title CU-2377 scip-go is logging errors that should be classified as warnings fix: CU-2377 scip-go is logging errors that should be classified as warnings Feb 4, 2026
@chrapkowski-sg chrapkowski-sg requested a review from jupblb February 4, 2026 20:02
Copy link

@peterguy peterguy left a comment

Choose a reason for hiding this comment

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

Based on the Slack discussion this is probably not the correct solution. The actual fix is probably handling multi-module repos in normalizePackage, not silencing the log.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants