* Remove Workspace in ios_workspace_with_microfeature_architecture fixture
* Add a xcframework flag on the cache warm command
* Add CacheControllerFactory
* Add ArtifactType
* Update CacheMapper
* Update CacheController
* Add --xcframeworks flag in the print hashes command
* Add --xcframeworks flag in the focus command
* Move the Dependency enum up from XCFrameworkNode up to PrecompiledNode, as it is also needed for FrameworkNode
* Refactor the cached binary building code to treat binaries as framework first
* Update graph and mapping logic to treat binaries as framework first
* Linter
* Improved wording
* Update TargetContentHasher
* Swiftformat
* Fix linting
* Extend the cache implementation to support storing multiple artifacts
* Some fixes and fix tests
* Fix the derived data path
* Fix all the tests
* Fix acceptance tests
* Fix acceptance tests
* Fix failing tests
Co-authored-by: Pedro Piñera <pepibumur@gmail.com>
- When launching Tuist in Xcode via opening the `Package.swift` file, locating and using the `ProjectDescription` framework fails
- This is due to a slightly different structure of where the built products are located when using Xcode and Swift Packages
- The built `.framework` resides in a subdirectory `PackageFrameworks`, while the `.swiftmodule` remains within built products directory
_Note: One aspect that doesn't work quite well is if you use an Xcode version that mismatches your `xcode-select -p` version. It seems, when Xcode is working with Swift Packages it no longer sets the `DEVELOPER_DIR` environment setting._
Test Plan:
- Open tuist in Xcode (via opening `Package.swift`)
- Update the scheme to include the launch arguments `tuist generate --path /path/to/some/fixture"
- Run tuist and verify generation works (note: repeat the test after delete `~/.tuist/Cache` to ensure manifest loading is taking place)
* Buildable schemes should include all buildable schemes, not just entry-level.
* Add list flag.
* Edit changelog.
* Remove list flag.
* Fix build acceptance test.
* [cache-download] Implement remote fetch logic
* [cache-download] Add tests in CacheRemoteStorageTests to cover the fetch part
* [cache-download] Moving FileClient to TuistSupport
* [cache-download] Rename zipFlow to unzip
* [cache-download] Force cast in test
* [cache-download] Streamlined errors output
* [cache-download] Expect an xcframework inside the unzipped archive or throw an error
* [cache-store] Add FileDownloader
* [cache-store] Add Zip as dependency
* [cache-store] Add server side error parsing
* [cache-store] Add CacheRemoteStorage in the default storage array
* [cache-store] Add md5 logic
* [cache-store] Refactor HTTPResource to be able to handle the HEAD cases more easily
* [cache-store] Add the Cache store functionality
* [cache-store] Linting
* [cache-store] Move zip logic into its own class to ease testing
* [cache-store] Added FileUploading to ease testing
* [cache-store] Fix unit tests and more cases to CacheRemoteStorageTests
* [cache-store] Linting
* [cache-store] Addressed PR comments about errors
* [cache-store] Remove unfinished FileDownloader.swift
* [cache-store] More precise FileUploaderError descriptions
* [cache-store] Move file size utility function to FileHandler
* [cache-store] Move md5 utility functions to FileHandler
* [cache-store] Remove hash parameter in Zip class
* [cache-store] Better error messages
* [cache-store] Add better error case and documentation in FileHandlerError
* [cache-store] Add mechanism to remove archive when the FileArchiver instance is deallocated
* [cache-store] Add FatalError conformity to HTTPRequestDispatcherError
* Some fixes
* [cache-store] Fix bug where the file archiver gets deallocated before it could delete its temporary files
* [cache-store] Move zip dependency to TuistSupport
Co-authored-by: Pedro Piñera <pedro@ppinera.es>
* Add command for generating a secret
* Document secret command
* Update CHANGELOG
* Rename to edit your projects
* Some style fixes
Co-authored-by: Pedro Piñera <pedro@ppinera.es>
* Add empty AutogeneratedSchemesGraphMapper
* Don't generate the schemes at generation time
* Implement AutogeneratedSchemesGraphMapper
* Update CHANGELOG
* Remove unnecessary method
* Turn the graph mapper into a project mapper
* Address some comments
Co-authored-by: Pedro Piñera <pedro@ppinera.es>
* Add Environment struct to the ProjectDescription framework
* Add tuistVariables to environment
* Pass down tuist environment variables when compiling the manifest and the helpers
* Add acceptance test
* Extract helpers hashing logic into a class and add unit tests
* Add documentation
* Update CHANGELOG
* Remove usage of Swift-5.2-only API
* Address some comments
- Each project within a workspace is currently generated independently and non of the project share any mutable state
- The graph is static during the generation process
- As such one option to gain some overall performance improvement is to generate project concurrently as well serialise them to disk concurrently.
- An additional stress test was added to ensure there were no concurrency issues during workspace generation
- The test logger needed some small thread safetey improvement
- Fix concurrency issues in Atomic
- Leverage execution contexts to control threading behavior of components
- Update `XcodeController` to minimize synchronization calls (via `Atomic`)
Test Plan:
- Verify all automated tests pass
- Stress test tuist via running this script in the `fixtures` directory
```sh
#!/bin/bash -e
# skip fixtures that are testing failure cases
declare -a skipped_fixtures=(
"invalid_workspace_manifest_name"
"ios_app_with_incompatible_dependencies"
"ios_app_with_incompatible_xcode"
"ios_workspace_with_dependency_cycle"
)
# Generate all fixtures in a loop
for i in {1..20}; do
for f in *
do
if [[ ! " ${skipped_fixtures[@]} " =~ " ${f} " ]]; then
if [[ -d $f ]]; then
echo ">> Generating: $f"
swift run tuist generate --path $f
echo ""
fi
fi
done
done
```
- Fix for a recently regressed unit test due to missing PR checks
- Re-enable pull request actions
- To avoid duplicate jobs the on push action only triggers the checks when the branch is master
- Added a conditional for tuist uploads for master only
Test Plan:
- Verify github actions are run on this PR
- The project generation process was replacing the entire `.xcodeproj` and `.xcworkspace` directories
- This lead to wiping all previous contents within those directories
- This included a nested `xcuserdata` directory which is usually gitignored and holds the Xcode UI state
- To reoslve this, only a the individual files are replaced rather than the entire directory
Test Plan:
- Run `tuist generate` within any fixture
- Open the generated project
- Navigate around, set breakpoints
- Re-order one of the source files (i.e. to cause a re-generation)
- Close Xcode
- Run `tuist generate` again
- Open the generated project
- Verify the last viewed file is opened automatically, breakpoints, the recently viewed files list are all still there