-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(lockfiles) avoid hand written reflection (#6143)
### Description As part of DYF I wanted to see if I could get rid of the `global_changes_key` part of the `Lockfile` trait by leveraging `Any`. Using `Any` has two benefits: - It doesn't depend on uniqueness of the magic string chosen to be part of the buffer that forms the key. (We've [already almost had an issue](#5934 (comment))) - It doesn't require any allocations in order to perform this comparison This gets us back to how the Go code used to work where we would take a pointer to a `Lockfile` interface and attempt to downcast it to the same concrete type before comparing fields. ### Testing Instructions Verifying that `--filter=[HEAD^1]` works as expected: - `npx create-turbo@latest test pnpm` - `cd test && pnpm rm turbo && git add . && git commit -m 'rm turbo'` (Remove local version of turbo so we can use global dev version easily) - `cd apps/web && pnpm add is-number && cd ../../ && git add . && git commit -m 'add is-number'` - `turbo_dev build --filter='[HEAD^1]' --experimental-rust-codepath` should only run `build` for `web` Closes TURBO-1443 --------- Co-authored-by: Chris Olszewski <Chris Olszewski>
- Loading branch information
1 parent
66446da
commit ef2b800
Showing
8 changed files
with
72 additions
and
69 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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 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 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 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