Skip to content

Commit

Permalink
SPM & 5.4 (#951)
Browse files Browse the repository at this point in the history
* WIP

* Fix path to the resources of test target

* Introduce SourceryLib target for testing purpose. It is the same as Sourcery but library, not executable.

Reason: linker has problems linking test target against executable.

* Import main target as SourceryLib when appropriate

* Re-enable specs that cause linker errors previously. JS spec left disabled since it needs additional configuration

* Add instruction how to fix error while running tests from Xcode

* No need to set ejsPath manually when framework is built with SPM anymore. Re-enable JS spec.

* Fix file references and build settings

* Use single define `SPM` that is set when the project is built by SPM

* Add CodableContextTests

* Fix build when building with SPM alone

* WIP TemplatesTests

* Fix executable name

* Update TemplatesTests

* Fix compilation of Xcode's project

* Add note

* Replace SPM flag with SWIFT_PACKAGE

* Revert Code signing settings

* Use release version of Nimble

* Point Quick to 3.0.0 version

* Optimize imports

* Exclude some files

* Fix error message

* Update template

* Change wording

* Add entry to CHANGELOG

* Rakefile: fix path to ejs.js

* Rakefile: fix path to ejs.js #2

* CircleCI config: fix path to ejs.js

* Add location of lib_InternalSwiftSyntaxParser.dylib to the -rpath

* Use bundled version of lib_InternalSwiftSyntaxParser.dylib

* Fix Nimble dependency

* Update -rpath of executable too. Otherwise it won't find the library when launched during TemplatesTests.

* Fix imports

Add 'import Foundation'

* Updated bundled sources

* feat: remove xcodeproj and add 5.4

* chore: update rakefile

* chore: update docs

* chore: cleanup rakefile

* chore: disable coverage since it won't work with spm only setup

Co-authored-by: HeMet <hemet.mail@gmail.com>
  • Loading branch information
krzysztofzablocki and HeMet committed May 2, 2021
1 parent 6eb6662 commit e834936
Show file tree
Hide file tree
Showing 576 changed files with 3,965 additions and 65,757 deletions.
5 changes: 2 additions & 3 deletions .circleci/config.yml
Expand Up @@ -27,9 +27,8 @@ jobs:
- run: set -o pipefail
- run: bundle exec rake build
- run: bundle exec rake tests
- run: swift build && .build/x86_64-apple-macosx/debug/sourcery --sources SourceryRuntime/Sources --templates Templates/Templates --output SourceryRuntime/Sources --ejsPath SourceryJS/Sources/ejs.js
- run: bundle exec slather coverage --scheme "$XCODE_SCHEME" --workspace "$XCODE_WORKSPACE" --output-directory $CIRCLE_ARTIFACTS --binary-basename SourceryRuntime --binary-basename Sourcery --cobertura-xml Sourcery.xcodeproj || true
- run: bash <(curl -s https://codecov.io/bash) -f $CIRCLE_ARTIFACTS/cobertura.xml -X coveragepy -X gcov -X xcode
# - run: bundle exec slather coverage --scheme "$XCODE_SCHEME" --workspace "$XCODE_WORKSPACE" --output-directory $CIRCLE_ARTIFACTS --binary-basename SourceryRuntime --binary-basename Sourcery --cobertura-xml Sourcery.xcodeproj || true
# - run: bash <(curl -s https://codecov.io/bash) -f $CIRCLE_ARTIFACTS/cobertura.xml -X coveragepy -X gcov -X xcode

workflows:
version: 2
Expand Down
2 changes: 1 addition & 1 deletion .jazzy.yaml
Expand Up @@ -2,7 +2,6 @@ author: Krzysztof Zabłocki
author_url: https://twitter.com/merowing_
module: Sourcery
sourcekitten_sourcefile: docs.json
module_version: 0.6.0
github_url: https://github.com/krzysztofzablocki/Sourcery
copyright: 'Copyright © 2016-2021 Pixle. All rights reserved.'
readme: About.md
Expand Down Expand Up @@ -37,6 +36,7 @@ custom_categories:
- Enum
- EnumCase
- AssociatedValue
- AssociatedType
- Variable
- Method
- MethodParameter
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -31,6 +31,7 @@

## Internal changes
- Removes manual parsing of `TypeName`, only explicit parser / configuration is now used
- Add support for testing via `SPM`
- Updted SwiftLint, Quick and Nible to latest versions

## 1.3.4
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Expand Up @@ -7,4 +7,4 @@ gem 'danger-jazzy'
gem 'rake'
gem 'slather'
gem 'xcpretty'
gem 'jazzy', '0.8.2'
gem 'jazzy', '0.13.6'
66 changes: 33 additions & 33 deletions Gemfile.lock
Expand Up @@ -62,7 +62,7 @@ GEM
concurrent-ruby (1.1.8)
cork (0.3.0)
colored2 (~> 3.1)
danger (8.2.1)
danger (8.2.3)
claide (~> 1.0)
claide-plugins (>= 0.9.2)
colored2 (~> 3.1)
Expand All @@ -74,36 +74,42 @@ GEM
kramdown-parser-gfm (~> 1.0)
no_proxy_fix
octokit (~> 4.7)
terminal-table (~> 1)
terminal-table (>= 1, < 4)
danger-jazzy (1.1.0)
danger-plugin-api (~> 1.0)
json (~> 2.1.0)
danger-plugin-api (1.0.0)
danger (> 2.0)
escape (0.0.4)
ethon (0.13.0)
ethon (0.14.0)
ffi (>= 1.15.0)
faraday (1.1.0)
faraday (1.4.1)
faraday-excon (~> 1.1)
faraday-net_http (~> 1.0)
faraday-net_http_persistent (~> 1.1)
multipart-post (>= 1.2, < 3)
ruby2_keywords
ruby2_keywords (>= 0.0.4)
faraday-excon (1.1.0)
faraday-http-cache (2.2.0)
faraday (>= 0.8)
faraday-net_http (1.0.1)
faraday-net_http_persistent (1.1.0)
ffi (1.15.0)
fourflusher (2.3.1)
fuzzy_match (2.0.4)
gh_inspector (1.1.3)
git (1.7.0)
git (1.8.1)
rchardet (~> 1.8)
httpclient (2.8.3)
i18n (1.8.10)
concurrent-ruby (~> 1.0)
jazzy (0.8.2)
cocoapods (~> 1.0)
mustache (~> 0.99)
jazzy (0.13.6)
cocoapods (~> 1.5)
mustache (~> 1.1)
open4
redcarpet (~> 3.2)
rouge (~> 1.5)
sass (~> 3.4)
redcarpet (~> 3.4)
rouge (>= 2.0.6, < 4.0)
sassc (~> 2.1)
sqlite3 (~> 1.3)
xcinvoke (~> 0.3.0)
json (2.1.0)
Expand All @@ -112,50 +118,44 @@ GEM
kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0)
liferaft (0.0.6)
mini_portile2 (2.5.0)
mini_portile2 (2.5.1)
minitest (5.14.4)
molinillo (0.6.6)
multipart-post (2.1.1)
mustache (0.99.8)
mustache (1.1.1)
nanaimo (0.3.0)
nap (1.1.0)
netrc (0.11.0)
no_proxy_fix (0.1.2)
nokogiri (1.11.1)
nokogiri (1.11.3)
mini_portile2 (~> 2.5.0)
racc (~> 1.4)
octokit (4.19.0)
octokit (4.21.0)
faraday (>= 0.9)
sawyer (~> 0.8.0, >= 0.5.3)
open4 (1.3.4)
public_suffix (4.0.6)
racc (1.5.2)
rake (13.0.1)
rb-fsevent (0.10.4)
rb-inotify (0.10.1)
ffi (~> 1.0)
rake (13.0.3)
rchardet (1.8.0)
redcarpet (3.5.1)
rexml (3.2.5)
rouge (1.11.1)
rouge (2.0.7)
ruby-macho (1.4.0)
ruby2_keywords (0.0.2)
sass (3.7.4)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
ruby2_keywords (0.0.4)
sassc (2.4.0)
ffi (~> 1.9)
sawyer (0.8.2)
addressable (>= 2.3.5)
faraday (> 0.8, < 2.0)
slather (2.5.0)
slather (2.7.1)
CFPropertyList (>= 2.2, < 4)
activesupport
clamp (~> 1.3)
nokogiri (~> 1.8)
nokogiri (~> 1.11)
xcodeproj (~> 1.7)
sqlite3 (1.4.2)
terminal-table (1.8.0)
terminal-table (3.0.0)
unicode-display_width (~> 1.1, >= 1.1.1)
thread_safe (0.3.6)
typhoeus (1.4.0)
Expand All @@ -171,8 +171,8 @@ GEM
claide (>= 1.0.2, < 2.0)
colored2 (~> 3.1)
nanaimo (~> 0.3.0)
xcpretty (0.2.6)
rouge (~> 1.8)
xcpretty (0.3.0)
rouge (~> 2.0.7)

PLATFORMS
ruby
Expand All @@ -182,7 +182,7 @@ DEPENDENCIES
cocoapods-update-if-you-dare
danger
danger-jazzy
jazzy (= 0.8.2)
jazzy (= 0.13.6)
rake
slather
xcpretty
Expand Down
40 changes: 38 additions & 2 deletions Package.resolved
Expand Up @@ -19,6 +19,24 @@
"version": "0.9.1"
}
},
{
"package": "CwlCatchException",
"repositoryURL": "https://github.com/mattgallagher/CwlCatchException.git",
"state": {
"branch": null,
"revision": "f809deb30dc5c9d9b78c872e553261a61177721a",
"version": "2.0.0"
}
},
{
"package": "CwlPreconditionTesting",
"repositoryURL": "https://github.com/mattgallagher/CwlPreconditionTesting.git",
"state": {
"branch": null,
"revision": "02b7a39a99c4da27abe03cab2053a9034379639f",
"version": "2.0.0"
}
},
{
"package": "Komondor",
"repositoryURL": "https://github.com/shibapm/Komondor.git",
Expand All @@ -28,6 +46,15 @@
"version": "1.0.6"
}
},
{
"package": "Nimble",
"repositoryURL": "https://github.com/Quick/Nimble.git",
"state": {
"branch": null,
"revision": "e491a6731307bb23783bf664d003be9b2fa59ab5",
"version": "9.0.0"
}
},
{
"package": "PackageConfig",
"repositoryURL": "https://github.com/shibapm/PackageConfig.git",
Expand All @@ -46,6 +73,15 @@
"version": "1.0.0"
}
},
{
"package": "Quick",
"repositoryURL": "https://github.com/Quick/Quick.git",
"state": {
"branch": null,
"revision": "8cce6acd38f965f5baa3167b939f86500314022b",
"version": "3.1.2"
}
},
{
"package": "ShellOut",
"repositoryURL": "https://github.com/JohnSundell/ShellOut.git",
Expand Down Expand Up @@ -87,8 +123,8 @@
"repositoryURL": "https://github.com/apple/swift-syntax.git",
"state": {
"branch": null,
"revision": "844574d683f53d0737a9c6d706c3ef31ed2955eb",
"version": "0.50300.0"
"revision": "2fff9fc25cdc059379b6bd309377cfab45d8520c",
"version": "0.50400.0"
}
},
{
Expand Down

0 comments on commit e834936

Please sign in to comment.