Commit Graph

872 Commits

Author SHA1 Message Date
Kas a3684c66d6
Add linting for mismatching build configurations in a workspace (#474)
Resolves https://github.com/tuist/tuist/issues/467

- All projects' build configurations are now validated against the top level projects
- In the event any are missing or are mismatching (e.g. have a mismatching variant) the linter will now flag them

Example:

```
$ tuist generate
The following issues have been found:
  - The project 'Framework2' has missing or mismatching configurations. It has [Debug (debug), Release (release)], other projects have  [Beta (release), Debug (debug), Release (release)].
```

Test Plan:

- Run `tuist generate` within `fixtures/ios_app_with_multi_configs`
- Comment out any of the build configurations defined in `App`, `Framework1` or `Framework2`
- Re-run `tuist generate`
- Verify a lint warning is displayed
2019-08-04 10:01:57 +01:00
dependabot[bot] 673926599b Bump lodash from 4.17.11 to 4.17.14 in /docs (#470)
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.11 to 4.17.14.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.11...4.17.14)

Signed-off-by: dependabot[bot] <support@github.com>
2019-08-02 13:24:39 -04:00
dependabot[bot] 5fe1a6f0d0 Bump lodash.template from 4.4.0 to 4.5.0 in /galaxy (#471)
Bumps [lodash.template](https://github.com/lodash/lodash) from 4.4.0 to 4.5.0.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.4.0...4.5.0)

Signed-off-by: dependabot[bot] <support@github.com>
2019-08-02 13:24:28 -04:00
dependabot[bot] 6acbd7f93c Bump lodash-es from 4.17.11 to 4.17.15 in /galaxy (#472)
Bumps [lodash-es](https://github.com/lodash/lodash) from 4.17.11 to 4.17.15.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.11...4.17.15)

Signed-off-by: dependabot[bot] <support@github.com>
2019-08-02 10:40:26 -04:00
dependabot[bot] be323bcc92 Bump lodash from 4.17.11 to 4.17.15 in /galaxy (#473)
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.11 to 4.17.15.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.11...4.17.15)

Signed-off-by: dependabot[bot] <support@github.com>
2019-08-02 10:39:28 -04:00
dependabot-preview[bot] 57d2d1cee7 Bump rubocop from 0.73.0 to 0.74.0 (#469)
Bumps [rubocop](https://github.com/rubocop-hq/rubocop) from 0.73.0 to 0.74.0.
- [Release notes](https://github.com/rubocop-hq/rubocop/releases)
- [Changelog](https://github.com/rubocop-hq/rubocop/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop-hq/rubocop/compare/v0.73.0...v0.74.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-02 10:34:03 -04:00
Kas 7d2388b0e3
Allow specifying multiple configurations within project manifests (#451)
- Exposing a new `CustomConfiguration` type to allow specifying named configurations with a variant (debug or release) to inner the default settings.
- Adding fixture `fixtures/ios_app_with_multi_configs` with acceptance tests
- Adding additional linting to ensure scheme specified configurations exist
- Updating scheme API to use configuration name strings instead of `BuildConfiguration` enum
- Renamed the `BuildConfiguration` enum to `PresetBuildConfiguration` enum to ensure schemes are backwards compatible
- Updating how default build configurations for scheme targets are selected
  - 'Debug' configuration is used for Run, Test and Analyze actions 
  - 'Release' configuration is used for the Profile & Archive actions.
  - If those aren't found, the first alphabetically ordered configuration with the corresponding variant is used
- Adding manifest linter to help flag manifest issues such as duplicate custom configuration names
- Updating documentation to include information on multiple configurations and some of the gotchas to watch out for

Test Plan:

- Run `tuist generate` within `fixtures/ios_app_with_multi_configs`
- Verify the generated project contains the build configurations "Debug", "Beta" and "Release"
- Verify the generated project `Framework2` has a target xcconfig override for the Beta configuration that points to `Target.Beta.xcconfig`
- Verify the generated project has a scheme "App-Beta" which uses the "Beta" configuration when performing the run action
- Verify that referencing a configuration within the scheme that isn't defined in the project flags a listing error
2019-07-31 20:44:11 +01:00
dependabot-preview[bot] ee6fab19ae Bump danger-swiftlint from 0.22.0 to 0.23.0 (#466)
Bumps [danger-swiftlint](https://github.com/ashfurrow/danger-ruby-swiftlint) from 0.22.0 to 0.23.0.
- [Release notes](https://github.com/ashfurrow/danger-ruby-swiftlint/releases)
- [Changelog](https://github.com/ashfurrow/danger-ruby-swiftlint/blob/master/Changelog.md)
- [Commits](https://github.com/ashfurrow/danger-ruby-swiftlint/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-31 09:24:14 -04:00
dependabot-preview[bot] f363f99c6a Bump danger-swiftformat from 0.5.0 to 0.6.0 (#463)
Bumps [danger-swiftformat](https://github.com/garriguv/danger-swiftformat) from 0.5.0 to 0.6.0.
- [Release notes](https://github.com/garriguv/danger-swiftformat/releases)
- [Commits](https://github.com/garriguv/danger-swiftformat/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-26 15:21:39 +02:00
Adam Khazi f84fe72181
Support Multiple Header Paths (#459)
Resolves https://github.com/tuist/tuist/issues/354

### Short description 📝

Add support to specify array of paths / glob patterns for headers such as the case below:

```
Headers(public: ["Sources/A/**/*.h", "Sources/B/**/*.h"],
        private: ["Sources/C/**/*.h", "Sources/D/**/*.h"],
        project: "Sources/E/**/*.h")
```

### Solution 📦

Similar to the way multiple source file paths/glob patterns were implemented  (https://github.com/tuist/tuist/pull/266). We can use `FileList` and `ExpressibleByStringLiteral` to  expose public, private and project headers as either a String or Array of Strings. The original `FileList` used for sources was not reused as it contained `compilerFlags` which is specific to source files. A new `FileList` containing only paths/glob patterns was created for use with headers. This way `FileList` can be potentially reused elsewhere.

### Implementation 👩‍💻👨‍💻

- [X] Remove `FileList` type alias from `SourceFilesList` and references to it 
- [X] Create new `FileList` without `compilerFlags`
- [X] Modify `Headers` to use the new `FileList` for public, private and project headers
- [X] Add tests to `GeneratorModelLoaderTests` to verify newly supported cases work
- [X] Create `ios_app_with_headers` fixture to support new array of strings case for headers
- [X] Write test that verifies `ios_app_with_headers` fixture targets build

### Test Plan
- Run `tuist generate` inside the `ios_app_with_headers` fixture
- Verify that the Framework1 target has the correct header files specified in the manifest
2019-07-25 13:56:40 +01:00
Kas c14824360b
Adding ability to re-generate individual projects (#457)
Resolves https://github.com/tuist/tuist/issues/452 

### Short description

To support workflows where only the local project needs to be re-generated without re-generating all its dependencies a new generation option is needed (see https://github.com/tuist/tuist/issues/452 for full rationale)

### Solution

Add a new option to generate the local project only.

usage:

```bash
tuist generate --project-only
```

### Implementation

- [x] Expose new generator method that generates a single project
- [x] Expose new option via command line argument `--project-only`
- [x] Update documentation
- [x] Update changelog 

### Test Plan

- Run `tuist generate` within `fixtures/ios_app_with_custom_workspace`
- Verify the workspace is still generated with all the dependencies as before
- Run `tuist generate` within `fixtures/ios_app_with_custom_workspace/App`
- Verify the project workspace is still generated with all the dependencies as before
- Run `tuist generate --project-only` within `fixtures/ios_app_with_custom_workspace/App`
- Verify only the `App`'s project re-generated (this can be done by either doing a git clean before running the command and then verifying that the only Xcode project is for `App` or by manually modifying any of the projects and verifying they don't update)
2019-07-24 11:39:04 +01:00
Adam Khazi bd1897a947 Do Not Create `Derived/InfoPlists` Folder When No InfoPlist Dictionary Specified (#456)
* fix and test case

* make info plist inclusion explicit

* swiftformat and changelog
2019-07-24 09:58:37 +02:00
Pedro Piñera 587948266c Fix link 2019-07-23 12:58:33 +02:00
dependabot-preview[bot] 90bb6e13bc Bump rake from 12.3.2 to 12.3.3 (#453)
Bumps [rake](https://github.com/ruby/rake) from 12.3.2 to 12.3.3.
- [Release notes](https://github.com/ruby/rake/releases)
- [Changelog](https://github.com/ruby/rake/blob/master/History.rdoc)
- [Commits](https://github.com/ruby/rake/compare/v12.3.2...v12.3.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-22 14:56:33 +02:00
Pedro Piñera Buendía d12f659940
Add new manifest file, TuistConfig.swift (#446)
* Add TuistConfig manifest model

* Add TuistConfig to the TuistGenerator

* Use the TuistConfig generationOptions to determine whether the manifest elements should be generated

* Generate a TuistConfig.swift when initialing a project using 'tuist init'

* Add documentation

* Add documentation

* Update CHANGELOG

* Fix tests
2019-07-22 09:05:23 +02:00
Pedro Piñera Buendía 74a56c6176
Create a symlink, swift-project pointing to /usr/local/bin/tuist (#447)
* Create a symlink swift-project that targets tuist

* Update CHANGELOG
2019-07-18 15:48:45 +02:00
dependabot-preview[bot] 1f8a75a1d9 Bump rubocop from 0.72.0 to 0.73.0 (#445)
Bumps [rubocop](https://github.com/rubocop-hq/rubocop) from 0.72.0 to 0.73.0.
- [Release notes](https://github.com/rubocop-hq/rubocop/releases)
- [Changelog](https://github.com/rubocop-hq/rubocop/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop-hq/rubocop/compare/v0.72.0...v0.73.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-16 17:21:26 +02:00
Pedro Piñera Buendía 58c6580f73
Pass Info.plist as dictionary (#380)
* Add a new case to Info.plist, dictionary

* Add .dictionary to the model in TuistGenerator

* Add DerivedFile model

* Add documentation

* Create a custom type for the InfoPlist dictionary

* Fix tests

* Update CHANGELOG

* Add logic to write Info.plist content

* Test DerivedFileGenerator

* Generate the file elements and the right configuration path

* Add tests

* Include Minitest::Assertions namespace

*  Fix acceptance tests

* Fix tests

* Add test that asserts that a codable & equatable object can be encoded and decoded, resulting in the same object

* Remove not used decoding logic from the InfoPlist.Value enum.
Moreover, update its tests to use the new XCTAssertCodable helper.

* Simplify the generation logic by setting the target.infoplist attribute pointing to the Info.plist generated in the Derived folder
2019-07-15 18:05:52 +02:00
dependabot-preview[bot] cc8367cd74 Bump danger-swiftlint from 0.21.1 to 0.22.0 (#444)
Bumps [danger-swiftlint](https://github.com/ashfurrow/danger-ruby-swiftlint) from 0.21.1 to 0.22.0.
- [Release notes](https://github.com/ashfurrow/danger-ruby-swiftlint/releases)
- [Changelog](https://github.com/ashfurrow/danger-ruby-swiftlint/blob/master/Changelog.md)
- [Commits](https://github.com/ashfurrow/danger-ruby-swiftlint/commits/0.22.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-15 15:03:20 +02:00
Adam Khazi 7923e06480 Transitive SDK Dependencies (#441)
* adds transitive sdk deps

* transitive dependencies are unique

* use sets, duplication test, immediate child test

* remove comments

* integration test

* integration test, remove throws

* minor fixes to naming etc

* swiftformat

* unneeded throws

* changelog entry and adds private to struct
2019-07-12 20:27:10 +02:00
dependabot-preview[bot] 23519cd222 Bump google-cloud-storage from 1.18.2 to 1.19.0 (#442)
Bumps [google-cloud-storage](https://github.com/googleapis/google-cloud-ruby) from 1.18.2 to 1.19.0.
- [Release notes](https://github.com/googleapis/google-cloud-ruby/releases)
- [Commits](https://github.com/googleapis/google-cloud-ruby/compare/google-cloud-storage/v1.18.2...google-cloud-storage/v1.19.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-12 15:26:45 +02:00
Pedro Piñera 4c07160e01 Fix the installation script 2019-07-12 09:42:51 +02:00
Pedro Piñera Buendía 3060c5f593
[Docs] Project structure (#440)
* Add contribution documentation

* Add colon

* Add testing section
2019-07-11 07:05:27 +02:00
Kas fdbe6289b3
Adding support for static products depending on dynamic frameworks (#439)
- Updating lint rules to allow static products to depend on dynamic frameworks
- Updating fixture to include scenario where a static framework depends on a dynamic framework

Test Plan:

- Verify unit tests pass via `swift tests`
- Verify acceptance tests pass via `bundle exec rake tests`

Manually:
- Run `tuist generate` within `fixtures/ios_app_with_static_frameworks`
- Verify the generation is successful
- Open the generated workspace
- Verify D is embedded in App and CTests
- Verify the app compiles runs
2019-07-10 10:58:00 +01:00
Oliver Atkinson 3453db8a10
Merge pull request #435 from tuist/product-name
Add support for defining `PRODUCT_NAME` in the manifest
2019-07-05 20:17:31 +01:00
Oliver Atkinson 3907b63794 Code Review 2019-07-05 10:13:26 +01:00
Oliver Atkinson b671aa922c Ensure tests are built to cover problem with multiple build products from a single embed phase 2019-07-05 08:38:09 +01:00
Oliver Atkinson cdff8e2db8 Update fixture to reference correct target name 2019-07-04 21:48:52 +01:00
Oliver Atkinson 1f4f684b9c swiftformat . 2019-07-04 21:29:08 +01:00
Oliver Atkinson ac3006d5ef Update fixture to show problem with embedding supporting multiple targets 2019-07-04 21:22:26 +01:00
Oliver Atkinson 2276bc75be Update fixture to cover scenario causing the wrong framework to be embedded 2019-07-04 21:07:00 +01:00
Oliver Atkinson 1f6b89a161 Only link direct dependencies of the target node, check for framework architechtures when linking 2019-07-04 20:46:18 +01:00
Oliver Atkinson be27efa7c7 Update CHANGELOG and docs 2019-07-04 13:47:11 +01:00
Oliver Atkinson 3430c9a87f Update fixture to test building for the different platforms 2019-07-04 13:26:23 +01:00
Oliver Atkinson 7301e378e1 Update product name for manifest 2019-07-04 13:26:23 +01:00
Oliver Atkinson 2e1695c9fd swiftformat . 2019-07-04 13:26:23 +01:00
Oliver Atkinson 714abb0c2d Unique products on target name rather than product name 2019-07-04 13:26:23 +01:00
Oliver Atkinson daac41c07e Update Fixture 2019-07-04 13:26:23 +01:00
Oliver Atkinson 8f2ebf973c swiftformat . 2019-07-04 13:26:23 +01:00
Oliver Atkinson d8ce237bed Support PRODUCT_NAME in manifest 2019-07-04 13:26:23 +01:00
Kas 95f7422d4d
Update manifest target name such that its product has a valid name (#426)
Part of https://github.com/tuist/tuist/issues/425

- Renaming the generated manifest target to include an `_` separator instead `-` which produces an invalid product name.
- This was causing Xcode to automatically re-name it when opening the project

Test Plan:

- Generate `fixtures/ios_app_with_tests` via `tuist generate`
- Run `git add . -f` to stage the generated project
- Open the project in Xcode
- Verify the manifest target `App_manifest` doesn't get renamed by Xcode within the Scheme and project
- Verify the manifest target can still build successfully
2019-07-03 23:09:57 +01:00
Pedro Piñera Buendía f584917534
Set up the Galaxy frontend's stack (#433)
* Setup webpacker for typescript

* Typescript is working

* Add documentation to set up the Galaxy project and start contributing to it

* Add Storybook

* Add Jest

* Remove tuistenv from the .gitignore

* Run rubocop
2019-07-03 13:41:08 +02:00
Pedro Piñera Buendía 5657230a8f
Merge installation scripts (#432)
* Merge installation scripts

* Don't run Rubocop

* Fix path

* Change Xcode version

* Fix path

* Fix command

* Add missing files
2019-07-02 22:16:21 +02:00
Pedro Piñera ab6dc11eda Add sketch file 2019-07-02 19:12:10 +02:00
Pedro Piñera Buendía 1b828716e9
Add "tuist graph" command (#427)
* Implement class to generate the dotgraph as a string

* Add GraphCommand

* Register command

* Add command to export the graph

* Fix graph syntax error

* Don't generate manifest targets when printing the graph

* Add tests

* Update CHANGELOG

* Add documentation

* Add the graph.dot file to the gitignore

* Address comments

* Don't lint when generating the graph
2019-07-02 16:13:27 +02:00
Pedro Piñera Buendía 5cc360f254
Add favicon (#430) 2019-07-02 12:16:06 +02:00
Pedro Piñera Buendía 2c6faab49e
Add Sentry for crash reporting (#429)
* configure Sentry

* Remove application.js from javascript/packs

* Use Ruby 2.6.3 on CircleCI
2019-07-02 08:56:38 +02:00
Pedro Piñera d28e647a51 Ruby 2.6.3 2019-07-01 17:52:59 +02:00
Pedro Piñera Buendía 3be6b6ee50
Merge galaxy into the Tuist repository (#428)
* Merge galaxy into the Tuist repository

* Delete READMEs

* Use Ruby 2.6.0

* Add bootstrap

* Add graph page

* Fix rubocop issues

* Add bootstrap
2019-07-01 17:28:58 +02:00
Pedro Piñera Buendía 4739ea80e0
Generate a dot graph from the project graph (#382)
* Add command to output the graph to the standard output

* Make Graph and nodes conform Encodable

* Print the graph as a json

* Some fixes after rebasing

* Pass file and line arguments

* Keep models and attributes as internal

* Extract the node classes into their own files

* Add DotGraph* elements

* Extract FrameworkNode from GraphNode

* Add tests

* Address comments
2019-06-29 08:48:24 +02:00