-
Notifications
You must be signed in to change notification settings - Fork 219
Export: trimming enhancements #3530
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
Open
DuBento
wants to merge
152
commits into
thought-machine:master
Choose a base branch
from
DuBento:export-from-package-metadata
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
152 commits
Select commit
Hold shift + click to select a range
8d0ecc4
Package level metadata that includes a mapping of build statements to…
c91668c
export using BuildFileMetadata logic
1276403
register caller scope for callstack-like traversal
836fff5
bufio writer for build statements
a505981
rewrite export logic into explicit flow
d3e67bc
export targets related to build statement
d09e7d0
enrich target with subincludes by looping though all scopes
1fb4f18
separate buildstmt register from adding target
b0c3c1e
select and write subincludes
3abc3cd
skip statement for preloaded subincludes
68b61e0
test: trim subincludes
aeb2e4a
rename file
1966979
use slices.collect and sort interface
50110d3
rewrite export with 2 concrete interfaces: default and notrim
65fd873
notrim: full copy BUILD file and visit sources
82f9587
double new lines between targets
00f617f
suppress diff output when enforcing repo differences
47ab394
export by filtering the original BUILD file
a2aa6a0
subincludes use label short string
28f61c6
Simplify package filtering method into a more explicit "switch" case
6616b6e
skip subrepos and internal packages when writing package file
f849a78
fix reusing err var resulted in failed filtering
7fffc39
doc strings for package metadata
b1fc186
export missing doc strings
6d572c7
test: named go_repo and change testify for slimmer UUID
ec888c5
export dependencies of subrepos - 13/14 tests passing
a4da492
test: internal repo test using temp directory to avoid stale data
e0fcfe2
fix: 0 label subinclude
7eda2cb
adjusting dependency lookup and adjacent target test to include secon…
9736002
test: add custom tool to native test
2f0a275
test: go_test export with several deps
88b5205
optional metadata parsing
4633d4f
test: minimal subinclude statement
2b2af8f
collect map keys on active subinclude labels
e0f2b61
non-fatal warning for missing source while exporting
4b984b6
skip internal package export
5faf4c1
move some fatal to error and continue
942c4b2
missing docstrings
215adc0
run go fmt and plz fmt
4746de6
move to error and continue for target lookup
1a758d0
rename new parser method on test files
e5ba148
use pkg.Metadata directly and remove intermediate pkg methods
31d4afe
mutex in packagemetadata
92c2e17
update stmt provider to avoid dereference
8733b00
NewPackage with variadic optional functions
488f951
infof to debugf
26d9a46
package metadata doc comments improvements
38ffa62
improve doc comments and adjust method visibility for export.go
8da1e96
hide build output when testing export
21e23c6
open and write of exported package file merged into the same method
2377776
update export_test.go with suggestions
d05a9c3
apply review suggestions to export.go
6bc28b5
rename and doc fields for scope
c1a04df
revert new line change of target
a95784c
set builtin code filename for scope for debugging
1d749b7
Rework packagemetadata to return empty slices or nil instead of error…
58e6532
linter fix imports
db93587
ensure subrepo target exists. Failing to export //... on this repo
bea7e98
go test for filtered package
2d608dd
Add doc comments for providers in asp.interpreter
4c81a60
test: function def in package file
165045d
unit testing current statement and active subincludes
beee484
remove nested maps and pointers in favor of using build labels
5ee2bcd
unexport noTrim implementation
3370418
AST based trimming (if-else and for):
029de6a
handle subinclude variables by tracking origin and used.
ac76bdd
scope metadata interface for optional metadata processing
fa25ce2
test: adjust interpreter tests with scope metadata and origin trackin…
69e310b
golint trimmer
0fe5d00
fix missing targets by keeping parser running and parsing inline duri…
6cdcebc
split export implementations into different files
1651a3e
fix: propagate cursor
fda8cd9
simplify calls to getOrParseTarget
fd68740
remove use of formatter and trim newlines
58d8936
reuse parser between build files
74d290a
use of baseExporter directly and interface cleanup
e2ef287
interpreter preloads info prevents secondary loading/subincludes
def5006
fix: deadlocking on closed results thread
8d95ab5
test: use system cache for speeding up e2e tests
6857d4d
add explicit targetToStmt mapping to improve CPU performance on FindS…
3f2427e
use cmap in package metadata, removing explicit usage of a shared mut…
a44e729
docs: interface implementation comment
56bc568
rename exporter source files
d11e014
apply feedback from multiple comments
ebe361d
local subrepos: fixes (relative filenames) and test
0500a75
export transitive subincludes, fixing unexported targets subincluded …
bb6b0e5
export gitignore
ee374ce
test: glob for sources
d87189e
Package parsing via WaitForPackage
97e90d7
test: move trim test files into data
89aca5c
test: trim subinclude in third_party/go test
94fd517
export label set
add2812
track used objects as a stack
a087c75
scopeMetadata: private, rename and comments
c459832
rename active to required subincludes
24035dc
imp: skip scope and package metadata tracking for external subrepos
41c72f9
remove doc reference to required target naming for successful export
d819246
Only pop symbols from stack in package scope + rework newScopeMetadat…
348cdc7
lazy initialize symbol origins
d75b5ea
Close package wait channels on error. Introduced a deadlock when Keep…
137f012
Support method calls as arguments by popping the symbol stack only at…
efcaabb
refactor: record all statements and respective origins for all statem…
8332c5f
Package level scope metadata; Tracking done at package level only.
46d8b29
Package metadata lookup table in interpreter to avoid recursive calle…
99f5b29
Trimmer: always keep for expression but trim stmts inside
fa7847f
glob statement: register files required by statements
3ea8dec
Checkpoint and restore symbol and file stack to support different cal…
54b70c6
move to BuildLabels in export and metadata to avoid pressure on GC
b38e018
track interpreted statements (mark as 0 targets) to correctly identif…
a39676f
subinclude tracking for dynamic subincludes
6e40952
track inner level globs.
beff770
feat(cmd): query print metadata - print package metadata
4db88e3
track inner statements (e.g. if clauses) and trim clauses based on if…
a935994
lint suggestions: remove hashBuildTarget and initialise labels slice …
376d14b
feat(cmd): metadata json formatting
08b8e94
progress monitor for export
ee07ae8
metadata: drop json printing and optional hidden targets
3ced65d
maintain subinclude label order
433333e
combined build inputs
4253c25
Pseudo uniform distribution
b7ad615
Package metadata renaming and doc comment fixes
e924bf4
Justify subsequent calls to RegisterStatement
397ed51
Address package metadata review comments: docs, zero value and sort
31361d7
Refactor: consolidate maps into single statement map with statement m…
9f5ad5e
Refactor: remove subinclude statement mapping and use isSubincludeSta…
2c1644c
State: test for logBuildError
beef2ac
export test formatting
30a5ee5
Fix if trim test: declared interpreted statements.
777b1f1
getOrParse safety timeout
5632e13
fix infinite counter
3bf3179
address query.metadata comments
0931003
strip symbols
1cbfd18
s/CleanUp/Cleanup
e6ff712
s/unneded/unneeded
ab48c30
standardise use of "unused" in tests
7f0bdfc
comments for interpreter.go
a081324
test: target variable trimming
229ea4f
revert: track preloaded in interpreter
10b3f05
fix: add new lines at the end of files
23b4f99
revert one time variable
7ba7f18
test: move complex go test to e2e
585d95a
lint: plz fmt
d32f1e6
fix: wrong reference to unused lib in e2e test
90e7436
refactor/revert: resolve package targets upfront instead of keeping p…
7552be7
refactor: decouple buildStatement from core by implementing interface…
ef3bd43
go lint
9b8ca27
unexport labelset
4f7c136
refactor: use RWmutex instead of cmaps for package metadata
0f073e4
refactor: introduce struct TrackedStatement instead of sorted slices …
0ae4949
test: trimming of variables that include targets
2c4ae9f
test: refactor build error test for better consistency
ff407e4
refactor: subincludeArgs as iterator
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
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.