Skip to content
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

refactor workspace initializers #3933

Merged
merged 3 commits into from
Jan 27, 2022
Merged

Conversation

tomerd
Copy link
Contributor

@tomerd tomerd commented Dec 11, 2021

motivation: workspace initializer is very robust, accomodating the needs of both libSwiftPM consumer and testing. we want to seperate these concerns a bit so that libSwiftPM exposes the minimum API surface area

changes:

  • deprecate existing workspace inisitlazer
  • create new minimalistic public initializer oriented towards libSwiftPM consumers
  • create internal initializer with all custmization options oriented towards testing
  • better abstract resolver configuraiton and other behavior settings into a struct
  • update callsite and tests to the new API

@tomerd tomerd added the WIP Work in progress label Dec 11, 2021
@tomerd tomerd requested a review from yim-lee December 11, 2021 02:38
@tomerd tomerd force-pushed the refactor/workspace-setup branch 2 times, most recently from c38affc to d2ba4e0 Compare December 11, 2021 02:41
@tomerd tomerd force-pushed the refactor/workspace-setup branch from d2ba4e0 to 5ca7853 Compare December 11, 2021 02:46
@tomerd tomerd force-pushed the refactor/workspace-setup branch 2 times, most recently from 049f27b to 2e5864a Compare December 13, 2021 18:47
Sources/Basics/FileSystem+Extensions.swift Outdated Show resolved Hide resolved
Sources/Commands/SwiftTool.swift Outdated Show resolved Hide resolved
Tests/FunctionalTests/MiscellaneousTests.swift Outdated Show resolved Hide resolved
Tests/FunctionalTests/MiscellaneousTests.swift Outdated Show resolved Hide resolved
Tests/FunctionalTests/MiscellaneousTests.swift Outdated Show resolved Hide resolved
Sources/Workspace/WorkspaceConfiguration.swift Outdated Show resolved Hide resolved
Sources/Workspace/Workspace.swift Outdated Show resolved Hide resolved
@tomerd tomerd force-pushed the refactor/workspace-setup branch 3 times, most recently from bd2376a to fb715fc Compare December 14, 2021 06:30
@tomerd
Copy link
Contributor Author

tomerd commented Dec 15, 2021

extracted the configuration + security location changes into #3942

@tomerd tomerd force-pushed the refactor/workspace-setup branch 2 times, most recently from 6a03cd9 to 64476bd Compare December 15, 2021 22:39
@tomerd tomerd force-pushed the refactor/workspace-setup branch from 64476bd to 7fb7628 Compare December 16, 2021 02:18
@tomerd tomerd force-pushed the refactor/workspace-setup branch 2 times, most recently from c3ce0ab to 8489d7e Compare December 16, 2021 02:27
Sources/Commands/SwiftTool.swift Outdated Show resolved Hide resolved
Sources/Commands/SwiftTool.swift Show resolved Hide resolved
Sources/Workspace/Workspace.swift Show resolved Hide resolved
@tomerd tomerd force-pushed the refactor/workspace-setup branch 5 times, most recently from 21e859c to c5bcf54 Compare December 21, 2021 04:00
@tomerd tomerd force-pushed the refactor/workspace-setup branch 3 times, most recently from edc31b7 to 6688990 Compare December 23, 2021 06:30
@tomerd
Copy link
Contributor Author

tomerd commented Dec 23, 2021

@swift-ci please smoke test

@tomerd tomerd changed the title [wip] refactor workspace initializer refactor workspace initializer Dec 23, 2021
@tomerd tomerd changed the title refactor workspace initializer [wip] refactor workspace initializer Dec 23, 2021
@tomerd tomerd force-pushed the refactor/workspace-setup branch 2 times, most recently from c77247c to 4757018 Compare December 23, 2021 21:28
@tomerd
Copy link
Contributor Author

tomerd commented Dec 23, 2021

@swift-ci please smoke test

@tomerd tomerd self-assigned this Jan 13, 2022
@tomerd tomerd force-pushed the refactor/workspace-setup branch from 4757018 to b8b9b74 Compare January 25, 2022 05:59
@tomerd tomerd added ready Author believes the PR is ready to be merged & any feedback has been addressed and removed WIP Work in progress labels Jan 25, 2022
@tomerd tomerd changed the title [wip] refactor workspace initializer refactor workspace initializer Jan 25, 2022
@tomerd
Copy link
Contributor Author

tomerd commented Jan 25, 2022

@swift-ci please smoke test

1 similar comment
@tomerd
Copy link
Contributor Author

tomerd commented Jan 25, 2022

@swift-ci please smoke test

motivation: workspace initializer is very robust, accomodating the needs of both libSwiftPM consumer and testing. we want to seperate these concerns a bit so that libSwiftPM exposes the minimum API surface area

changes:
* deprecate existing workspace inisitlazer
* create new minimalistic public initializer oriented towards libSwiftPM consumers
* create internal initializer with all custmization options oriented towards testing
* better abstract resolver configuraiton and other behavior settings into a struct
* pass observability scope to workspace initializer via thread local (from CLI)
* update callsite and tests to the new API
@tomerd tomerd force-pushed the refactor/workspace-setup branch from 615db52 to 6f52ce9 Compare January 26, 2022 23:39
@tomerd
Copy link
Contributor Author

tomerd commented Jan 26, 2022

@swift-ci please smoke test

@tomerd tomerd changed the title refactor workspace initializer refactor workspace initializers Jan 26, 2022
@tomerd tomerd merged commit 74eafce into swiftlang:main Jan 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready Author believes the PR is ready to be merged & any feedback has been addressed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants