-
Notifications
You must be signed in to change notification settings - Fork 525
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
reuse LockFile.GetAllDependenciesOf in Simplifier #420
Conversation
@@ -21,28 +21,13 @@ let private simplify file before after = | |||
let private interactiveConfirm fileName (PackageName package) = | |||
Utils.askYesNo(sprintf "Do you want to remove indirect dependency %s from file %s ?" package fileName) | |||
|
|||
let Analyze(allPackages : list<ResolvedPackage>, depFile : DependenciesFile, refFiles : ReferencesFile list, interactive) = | |||
let Analyze(lockFile : LockFile, depFile : DependenciesFile, refFiles : ReferencesFile list, interactive) = |
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.
yes taking the lockfile looks good.
reuse LockFile.GetAllDependenciesOf in Simplifier
|
||
printfn "" | ||
simplify depFile.FileName <| depFile.ToString() <| simplifiedDepFile.ToString() | ||
|
||
if depFile.Options.Strict then |
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.
Why does this got removed?
If it was intentional, we should update the documentation.
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.
The behavior is still the same - GetAllDependenciesOf
checks for strict mode, so with strict mode on, the references files will not be affected. The only change is that there'll be no warning anymore
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.
And each reference file will be stated as already simplified, what is not really the case, right?
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.
after thinking bout it for a while it seems to me that simplify should really fail instantly if we detect strict mode. Why one would simplify having the strict mode on?
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.
Yes, it seems to make no sense to support this combination.
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.
Then I'll prohibit that in next PR
No description provided.