-
Notifications
You must be signed in to change notification settings - Fork 318
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
Various small tickets... #7367
Various small tickets... #7367
Conversation
Fix broken type signature.
Add a few more test cases.
_ -> | ||
used_filter = if recursive.not || name_filter.contains "**" then name_filter else |
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.
contains or starts_with? If it has a **
in the middle but not at the start, will it still work 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.
if it has **
in the middle I am trusting you know what you are doing!
|
||
"건반(Korean)".length | ||
length : Integer | ||
length self = @Builtin_Method "Text.length" |
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.
Advanturous! Static method is builtin, but instance method not and delegates to the static one. I am suprised it works. But if it does, then OK.
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 think I don't understand, where is a static method here?
filtered2 = root.list name_filter="*/*/*" recursive=True . map .to_text | ||
filtered2.should_equal (resolve ["subdirectory/nested/b.txt"]) |
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 case looks slightly worrying. If I understand correctly what happens, it will be prepended with **
. So now it will find all paths that have >= 3
layers of nesting, whereas before this change it would only find paths that have == 3
layers of nesting.
Looking at the call, I'd indeed expect == 3
to be the correct behaviour here.
I appreciate the change, as indeed the other tests that you added show it was needed - specially the one just below - indeed if recursive=True
, it's nice to find the file in all subdirectories. But it can break some usages for more advanced use cases. I'm not sure if we can do anything good about it though... It is not great that we cannot now use this method to find == n
layers of nesting - we will always find arbitrarily nested files. On the other hand, maybe it's not that important - I think overall this change is a pragmatic improvement.
Pull Request Description
Text.length
into Text class so CB lists the built in.File.starts_with
and tests for the built in method.to_js_object
andto_display_text
toRegex
.to_js_object
andto_display_text
toMatch
.bit_shift_l
alias from the built-ins.Text.is_normalized
.Checklist
Please ensure that the following checklist has been satisfied before submitting the PR:
Scala,
Java,
and
Rust
style guides. In case you are using a language not listed above, follow the Rust style guide.
./run ide build
.