Pass more options from package:find_tool to lib.detect.find_tool#6172
Merged
waruqi merged 1 commit intoxmake-io:devfrom Feb 26, 2025
Merged
Pass more options from package:find_tool to lib.detect.find_tool#6172waruqi merged 1 commit intoxmake-io:devfrom
package:find_tool to lib.detect.find_tool#6172waruqi merged 1 commit intoxmake-io:devfrom
Conversation
waruqi
reviewed
Feb 26, 2025
| require_version = opt.require_version, | ||
| norun = opt.norun, | ||
| system = opt.system, | ||
| force = opt.force}) |
Member
There was a problem hiding this comment.
? why remove these args?
require_version = opt.require_version,
norun = opt.norun,
system = opt.system,
force = opt.force
Contributor
Author
There was a problem hiding this comment.
I thought those arguments were already included in the opt table and passed directly to self._find_tool. Since opt is being passed as an entire table, I assumed we didn't need to explicitly pass each of these individual arguments again.
Member
There was a problem hiding this comment.
We should not use opt parameter directly, it will modify the state of opt object outside the function.
Member
There was a problem hiding this comment.
Also, not all opt parameters should be passed in. They are not all the same. Some parameters are only used by packages and should not be passed to lib.detect.find_tool
b069925 to
a70939f
Compare
a70939f to
6f1f7d7
Compare
package:find_tool to lib.detect.find_toolpackage:find_tool to lib.detect.find_tool
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This update ensures that
all optionsoptionscheck,commandandparseare passed frompackage:find_tooltolib.detect.find_tool, allowing for customizable check methods in packages.