-
Notifications
You must be signed in to change notification settings - Fork 709
Duplicate project import as a warning only #10933
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
base: master
Are you sure you want to change the base?
Duplicate project import as a warning only #10933
Conversation
16a11bd
to
95ec86a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
-- NOTE: Reverse the warnings so they are in line number order. | ||
<&> \case ProjectParseOk ws x -> ProjectParseOk (reverse ws) x; x -> x | ||
parseProject rootPath cacheDir httpTransport verbosity configToParse = do | ||
let (dir, projectFileName) = splitFileName rootPath |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It'd be preferable to not change layout/identation without a real need, I think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I strive for minimal diffs. In this situation, I was rebasing something older and it made the merge conflict resolution easier this way.
I actually prefer the way it was before the latest commit, with the = do
on the same line rather than do
by itself on its own line. This also has less indentation.
If you're OK with the way it is, then I'd like to keep it that way, the way it was, one commit before the last commit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a little surprised that fourmolu doesn't always normalize.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or it could have been I used a more recent version of fourmolu at some stage.
95ec86a
to
f108389
Compare
- Add Y-forking import test - A test for detecting when the same config is imported via many different paths - Error on duplicate imports - Do the filtering in duplicateImportMsg - Use duplicateImportMsg for cycles too - Add haddocks to IORef parameter - Add changelog entry - Use ordNub instead of nub - Use NubList - Share implement of duplicate and cyclical messages - Update expectation for non-cyclical duplicate import - Only show a warning - Add woops project with a time cost - Use noticeDoc instead of warn - Render duplicate imports - Add Ord instance for Dupes, sort on dupesNormLocPath - Fixups after rebase - Satisfy hlint - Remove -XMultiWayIf - Remove mention of yops from the changelog - Satisfy fix-whitespace - Test with a time cost of duplicate imports
f108389
to
115fcd2
Compare
c230d20
to
b61e031
Compare
Pretty much the same as #9933 but gives a warning instead of an error when duplicate imports that are not cyclical are detected. I did this work in Oct 2024 but didn't raise a pull request for it then.
significance: significant
in the changelog file.