Skip to content

Conversation

@shu-bc
Copy link

@shu-bc shu-bc commented Oct 22, 2025

Import order of generated model files changes from time to time. It causes a large number of file changes in my current working project. Stable import order might be solution for this.

Running gofmt after generation may be an alternative, but I don't think anyone could be in favor of unstable import order.

@codecov
Copy link

codecov bot commented Oct 22, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.18%. Comparing base (0585cd1) to head (fd9d97d).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #526      +/-   ##
==========================================
- Coverage   92.18%   92.18%   -0.01%     
==========================================
  Files         139      139              
  Lines        8576     8572       -4     
==========================================
- Hits         7906     7902       -4     
  Misses        493      493              
  Partials      177      177              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@go-jet
Copy link
Owner

go-jet commented Nov 9, 2025

Running gofmt after generation may be an alternative, but I don't think anyone could be in favor of unstable import order.

gofmt is already run as a last step of generation - here.

importPaths[importPath] = true
if importPath != "" && !seen[importPath] {
ret = append(ret, importPath)
}
Copy link
Owner

Choose a reason for hiding this comment

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

Not sure, how this change would stabilize import order??

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