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
Shared system instance #519
Merged
Merged
Conversation
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
…s to use those classes instead. Make some progress Refactor tests to use TuistUnitTestCase Create TuistTestCase
pepicrft
force-pushed
the
shared-system
branch
from
October 10, 2019 07:31
f7c6034
to
c71e745
Compare
SwiftLint found issuesWarnings
Generated by 🚫 Danger |
Codecov Report
@@ Coverage Diff @@
## master #519 +/- ##
==========================================
+ Coverage 91.17% 91.34% +0.17%
==========================================
Files 362 364 +2
Lines 19437 19478 +41
==========================================
+ Hits 17722 17793 +71
+ Misses 1715 1685 -30
Continue to review full report at Codecov.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Short description 📝
Many methods in the code base took
system: Systeming
as an argument. That allowed us to inject a mock system for testing purposes but as a downside, it added unnecessary verbosity to the definition of the methods.Solution 📦
Like we did with other utilities, this PR updates the class to make the constructor
internal
, and exposes a shared static instance. Since this class doesn't hold any state, in case we start doing more work in multiple threads in the future, it should be thread-safe.Implementation 👩💻👨💻
System.shared
.