-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
fix glob matching of alternatives #6839
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
10 Ignored Deployments
|
}; | ||
|
||
let c = &chars[self.cursor.cur_cursor()..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.
This is unused, but it doesn't really make sense to use the path cursor to index chars
} | ||
} else if let Some(alternative) = alternatives.get(self.cursor.cur_cursor()) { |
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.
path cursor can't be used to index alternatives list
🟢 Turbopack Benchmark CI successful 🟢Thanks |
let Ok(Some(_)) = self.cursor.next_boundary(self.path, 0) else { | ||
return None; | ||
}; |
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 is just shorter and cleaner
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 I'm always forgetting there's let..else syntax
✅ This change can build |
|
let Ok(Some(_)) = self.cursor.next_boundary(self.path, 0) else { | ||
return None; | ||
}; |
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 I'm always forgetting there's let..else syntax
#[case::alternatives_nested1("{a,b/c,d/e/{f,g/h}}", "a")] | ||
#[case::alternatives_nested2("{a,b/c,d/e/{f,g/h}}", "b/c")] | ||
#[case::alternatives_nested3("{a,b/c,d/e/{f,g/h}}", "d/e/f")] | ||
#[case::alternatives_nested4("{a,b/c,d/e/{f,g/h}}", "d/e/g/h")] | ||
// #[case::alternatives_chars("[abc]", "b")] |
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.
is this inteded to be commented?
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 isn't supported in the glob parsing yet. We might want to uncomment that test case once we implement that.
### Description The unicode refactoring introduced some bugs in matching of alternatives Closes PACK-2172
* vercel/turborepo#6720 <!-- Tobias Koppers - fix weird local name, add tests --> * vercel/turborepo#6832 <!-- Leah - fix(turbopack-ecmascript): make sure async module wrapper is always generated --> * ~vercel/turborepo#6885 <!-- Tobias Koppers - fix aggregation of outdated children and collectibles --> * ~vercel/turborepo#6839 <!-- Tobias Koppers - fix glob matching of alternatives -->~ * vercel/turborepo#6884 <!-- Donny/강동윤 - Update `swc_core` to `v0.87.16` --> * vercel/turborepo#6964 <!-- Tobias Koppers - Reduce calls, tasks and duplicate work -->
### Description The unicode refactoring introduced some bugs in matching of alternatives Closes PACK-2172
### Description The unicode refactoring introduced some bugs in matching of alternatives Closes PACK-2172
### Description The unicode refactoring introduced some bugs in matching of alternatives Closes PACK-2172
### Description The unicode refactoring introduced some bugs in matching of alternatives Closes PACK-2172
Description
The unicode refactoring introduced some bugs in matching of alternatives
Closes PACK-2172