-
Notifications
You must be signed in to change notification settings - Fork 389
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
Split check command into separate file #9707
base: master
Are you sure you want to change the base?
Conversation
The unit tests are failing because the docopt string for I get that |
afee15b
to
36399f7
Compare
crew build [options] [-k|--keep] [-v|--verbose] <name> ... | ||
crew check [-V|--version] [-v|--verbose] <name> ... | ||
crew build [options] [-f|--force] [-k|--keep] [-v|--verbose] <name> ... | ||
crew check [-f|--force] <name> ... |
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.
Keep the verbose option?
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 never did anything, so removing it just makes things less misleading.
b584f9b
to
d5f85c3
Compare
1783356
to
64ce216
Compare
@@ -94,7 +94,6 @@ Where available commands are: | |||
| remove | remove package(s) | | |||
| search | look for package(s) | | |||
| sysinfo | show system information in markdown style | | |||
| test | test crew command(s) | |
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.
What if we want to test prior to submitting a PR? If this is removed, we would have to submit a PR and see if the tests fail first? If that is true, not ideal.
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.
If we want to test prior to submitting a PR, we now run rake test
.
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.
This also allows easier testing on non-ChromeOS environments, as you do not need to have crew installed to test every command at once.
abort "\n#{@failed} dependency #{@cycles} found.".lightred | ||
else | ||
puts "\nNo dependency cycles found.".lightgreen | ||
end |
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.
Does this no longer have any value? Someone put a lot of effort into creating this test.
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.
Unfortunately, it does not. As per the PR description, we have a number of packages with dependency cycles, including unavoidable ones such as cairo, harfbuzz, freetype and the rest.
If this test still worked, it would fail on behavior that we cannot change.
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 will live on in the git history, though 😅
Split out
check
command tocommands/check.rb
.Behavior changes:
crew test
with a Rakefile andcrew check
.ruby_rubocop
is not installed.crew check -v
behaviour.version.rb
with the name of the package works the same, and dropping this wrapper allows us to drop the-V
parameter which was at cross purposes with the same parameter when used like so:crew -V
.prop_test
andbuildsystem_test
less verbose by default.crew check
.cycle_test
.Refactoring changes:
(
prop_test
andbuildsystem_test
)@tofail
.CREW_PACKAGES_PATH
andCREW_LIB_PATH
rather than relative directory paths.check_properties
rather than using a name and an instance variable.check_buildsystem
.(
bin/crew
andcommands/check.rb
)check_package
andcopy_package
into a single function, using theto_copy
variable to replicate the previous method of outsourcing both the prompting for input and subsequent copying tocopy_package
.crew build
,crew install
andcrew reinstall
all now callCommand.check
, we rework the case of there being no local package to check to result in a silent ignore when we are calling it from another method (so you can install packages without having to worry about being inCREW_LOCAL_REPO_ROOT
, but we let the user know about this happening when it is a call fromcrew check
.CREW_LIB_PATH
instead of relative paths.File.join
instead of string interpolation.Tested and working on
x86_64
.Run the following to get this pull request's changes locally for testing.