-
Notifications
You must be signed in to change notification settings - Fork 662
Incremental port #1322
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
+15,326
−2,764
Merged
Incremental port #1322
Changes from all commits
Commits
Show all changes
48 commits
Select commit
Hold shift + click to select a range
ede403a
Refactor
sheetalkamat ba71811
Add stub for incremental
sheetalkamat 5910a23
Incremental
sheetalkamat b642e22
Make buildinfo tests portable and readable
sheetalkamat 4ef2a94
Handle casing with compiler options serialization
sheetalkamat da2a0c4
make common js default impolied file format
sheetalkamat 9123231
More changes
sheetalkamat 6c0f24e
More changes
sheetalkamat b6cdfce
fix test
sheetalkamat a2f13d9
more change
sheetalkamat 703cd4b
Parallel!!!
sheetalkamat 4ad58ed
Tests
sheetalkamat 7395f27
Watch changes
sheetalkamat 77c8a12
Verify diagnostic and options serializing
sheetalkamat 31a8c76
Tests for reference map
sheetalkamat 3f2fbfd
Lint
sheetalkamat a6cdc84
Use fake lib contents to make it deterministic for baselining as well…
sheetalkamat 93c6232
Fix race with latest dts file
sheetalkamat bdb9076
Fix more tests
sheetalkamat 8c0d4b5
change to test
sheetalkamat 8c62de6
Lint
sheetalkamat f93f053
Support for edits in tsc tests
sheetalkamat efd838e
Fix race with default libs
sheetalkamat 1973134
Always collect references for proper program update
sheetalkamat 2ab1229
Add baseline for semantic diagnostics refresh to check for correctness
sheetalkamat 8117de5
No need for scenario name in test name
sheetalkamat 30f10d3
Baseline signature compute
sheetalkamat 3a5e3ac
Test incremental edit
sheetalkamat e1b3dc7
Fix modified edit baseline
sheetalkamat e7df40d
Use semantic diagnosics from old snapshot to compare
sheetalkamat 766d372
Fix incremental updates
sheetalkamat d0cefe6
More tests and updates
sheetalkamat e048d22
Unify tsc runner even more
sheetalkamat 2f89867
Test fs refactor
sheetalkamat 776ba84
rename test baselines
sheetalkamat 8d8c62c
Write signature and its text for testing
sheetalkamat f4d5056
Incremental correctness
sheetalkamat 7d7d4f8
Cleanup
sheetalkamat 953be0d
Fix lint
sheetalkamat 405d19f
Feedback
sheetalkamat 3372773
keep mod time and compare it
sheetalkamat c84c4e1
Use written files for diffing
sheetalkamat 4002609
diffing sorted
sheetalkamat c87868f
Merge branch 'main' into incremental
sheetalkamat f8f1040
use fnv.New128a instead
sheetalkamat ce8668f
lint
sheetalkamat 14d9532
Update internal/incremental/snapshot.go
sheetalkamat 532dad6
Fix error
sheetalkamat 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
package collections | ||
|
||
import "fmt" | ||
|
||
type ManyToManySet[K comparable, V comparable] struct { | ||
keyToValueSet map[K]*Set[V] | ||
valueToKeySet map[V]*Set[K] | ||
} | ||
|
||
func (m *ManyToManySet[K, V]) GetKeys(value V) (*Set[K], bool) { | ||
keys, present := m.valueToKeySet[value] | ||
return keys, present | ||
} | ||
|
||
func (m *ManyToManySet[K, V]) GetValues(key K) (*Set[V], bool) { | ||
values, present := m.keyToValueSet[key] | ||
return values, present | ||
} | ||
|
||
func (m *ManyToManySet[K, V]) Len() int { | ||
return len(m.keyToValueSet) | ||
} | ||
|
||
func (m *ManyToManySet[K, V]) Keys() map[K]*Set[V] { | ||
return m.keyToValueSet | ||
} | ||
|
||
func (m *ManyToManySet[K, V]) Set(key K, valueSet *Set[V]) { | ||
_, hasExisting := m.keyToValueSet[key] | ||
if hasExisting { | ||
panic("ManyToManySet.Set: key already exists: " + fmt.Sprintf("%v", key)) | ||
} | ||
if m.keyToValueSet == nil { | ||
m.keyToValueSet = make(map[K]*Set[V]) | ||
} | ||
m.keyToValueSet[key] = valueSet | ||
for value := range valueSet.Keys() { | ||
// Add to valueToKeySet | ||
keySetForValue, exists := m.valueToKeySet[value] | ||
if !exists { | ||
if m.valueToKeySet == nil { | ||
m.valueToKeySet = make(map[V]*Set[K]) | ||
} | ||
keySetForValue = &Set[K]{} | ||
m.valueToKeySet[value] = keySetForValue | ||
} | ||
keySetForValue.Add(key) | ||
} | ||
} |
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
Oops, something went wrong.
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.