-
Notifications
You must be signed in to change notification settings - Fork 9
Fix expandGlob() function #206
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
Merged
Merged
Changes from 7 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
1c287ef
TDD commit to fix expandGlob()
mateusz-olczyk cd102e0
Fix expandGlob()
mateusz-olczyk 24c20d6
Add index_globs_compilable test variant
mateusz-olczyk 6f65e68
Refactor expandGlob()
mateusz-olczyk 74773bb
Rename test cases
mateusz-olczyk 7d26a0f
Ensure globbing subdirectories within the same package
mateusz-olczyk 15ca999
Use collections.FilterMapSeq
mateusz-olczyk 2bdecf0
Remove accidental .DS_Store file, extend .gitignore
mateusz-olczyk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
Binary file not shown.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,9 @@ | ||
| load("@rules_cc//cc:defs.bzl", "cc_library") | ||
|
|
||
| cc_library( | ||
| name = "library_with_build", | ||
| hdrs = ["with_build.h"], | ||
| ) | ||
| hdrs = glob(["**/*.h"]), | ||
| include_prefix = "include/with_build", | ||
| strip_include_prefix = "subdir", | ||
| visibility = ["//visibility:public"], | ||
| ) |
9 changes: 9 additions & 0 deletions
9
language/cc/testdata/index_globs/include/with_build/BUILD.out
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| load("@rules_cc//cc:defs.bzl", "cc_library") | ||
|
|
||
| cc_library( | ||
| name = "library_with_build", | ||
| hdrs = glob(["**/*.h"]), | ||
| include_prefix = "include/with_build", | ||
| strip_include_prefix = "subdir", | ||
| visibility = ["//visibility:public"], | ||
| ) |
File renamed without changes.
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| # gazelle:cc_group unit | ||
|
|
||
| cc_library( | ||
| name = "library", | ||
| hdrs = glob( | ||
| ["include/**/*.h"], | ||
| ["include/private/*.h"]), | ||
| ) | ||
|
|
||
| cc_library( | ||
| name = "library_private", | ||
| hdrs = glob( | ||
| include = ["include/private/*.h"], | ||
| exclude = ["include/**/excluded_*.h"] | ||
| ), | ||
| ) |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| # gazelle:cc_group unit | ||
|
|
||
| cc_library( | ||
| name = "library", | ||
| hdrs = glob( | ||
| ["include/**/*.h"], | ||
| ["include/private/*.h"]), | ||
| ) | ||
|
|
||
| cc_library( | ||
| name = "library_private", | ||
| hdrs = glob( | ||
| include = ["include/private/*.h"], | ||
| exclude = ["include/**/excluded_*.h"] | ||
| ), | ||
| ) |
Empty file.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| src |
File renamed without changes.
Empty file.
Empty file.
Empty file.
Empty file.
4 changes: 4 additions & 0 deletions
4
language/cc/testdata/index_globs_excluded/include/with_build/BUILD.in
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| cc_library( | ||
| name = "library_with_build", | ||
| hdrs = glob(["*.h"]), | ||
| ) |
4 changes: 4 additions & 0 deletions
4
language/cc/testdata/index_globs_excluded/include/with_build/BUILD.out
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| cc_library( | ||
| name = "library_with_build", | ||
| hdrs = glob(["*.h"]), | ||
| ) |
Empty file.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| load("@rules_cc//cc:defs.bzl", "cc_library") | ||
|
|
||
| cc_library( | ||
| name = "usage_excluded", | ||
| srcs = ["usage_excluded.cc"], | ||
| visibility = ["//visibility:public"], | ||
| ) | ||
|
|
||
| cc_library( | ||
| name = "usage_lib", | ||
| srcs = ["usage_lib.cc"], | ||
| implementation_deps = ["//:library"], | ||
| visibility = ["//visibility:public"], | ||
| ) | ||
|
|
||
| cc_library( | ||
| name = "usage_lib-ext", | ||
| srcs = ["usage_lib-ext.cc"], | ||
| implementation_deps = ["//:library"], | ||
| visibility = ["//visibility:public"], | ||
| ) | ||
|
|
||
| cc_library( | ||
| name = "usage_private", | ||
| srcs = ["usage_private.cc"], | ||
| implementation_deps = ["//:library_private"], | ||
| visibility = ["//visibility:public"], | ||
| ) | ||
|
|
||
| cc_library( | ||
| name = "usage_with_build", | ||
| srcs = ["usage_with_build.cc"], | ||
| implementation_deps = ["//include/with_build:library_with_build"], | ||
| visibility = ["//visibility:public"], | ||
| ) |
File renamed without changes.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| #include "include/contrib/lib-ext.h" |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| #include "include/lib.h" |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| #include "include/private/private.h" |
1 change: 1 addition & 0 deletions
1
language/cc/testdata/index_globs_excluded/src/usage_with_build.cc
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| #include "include/with_build/with_build.h" |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.