Comments (6)
You'd need to use the spm cache
from sourcery.
Hello no news on this so far?
from sourcery.
You need to get at least definition scanned, you can add conformance in your own project code
from sourcery.
You need to get at least definition scanned, you can add conformance in your own project code
How may I achieve this?
Since the it's an SPM the definition is not really in project, how can I set the .yml configuration to scan the SPM package code?
from sourcery.
You'd need to use the spm cache
I tried to use the swiftpm cache in the config file like this:
sources:
- ../../ElementX
- ~/Library/Caches/org.swift.swiftpm/
templates:
- AutoMockable.stencil
output:
../../ElementX/Sources/Mocks/Generated/GeneratedMocks.swift
args:
automMockableTestableImports: []
autoMockableImports: [Combine, Foundation, MatrixRustSDK, AnalyticsEvents]
However it's still trying to access my folder locally instead of accessing it from the user folde, in fact the script fails saying:
'/Users/mauroromito/Documents/Xworkspace/element-x-ios/Tools/Sourcery/~/Library/Caches/org.swift.swiftpm' does not exist or is not readable.
Of course since the sourcery script should also work across multiple collaborators and on the CI, I can't use multiple ../ to reach the user folder.
How would I achieve that with the .yml configuration?
from sourcery.
@Velin92 you might want to consider using a build tool plugin like I've mentioned in here https://www.polpiella.dev/sourcery-swift-package-command-plugin
from sourcery.
Related Issues (20)
- Getting generic requirements from methods HOT 1
- Possible to generate asset catalog constants? HOT 1
- Detecting if a variable is an Enum works if enum is declared in the file but doesn't otherwise. HOT 4
- AutoMockable does not generate valid Swift code during method generic requirement parsing HOT 2
- Swift macros and method bodies HOT 1
- Update CHANGELOG
- Generated code doesn't compile if returning type starts with the "any" keyword HOT 5
- Sourcery not passing variable to .stencil file inside {{ }}
- --cacheBasePath is treated as an absolute path
- `SwiftTemplate` fails to build due to `Invalid manifest` HOT 9
- Pull in protocol info from other projects/targets, without generating for those projects/targets HOT 3
- Typealias resolution replaces unrelated generic types HOT 4
- Crash when regenerate changed file HOT 1
- Old swift-collections version
- Associatedtype not parsing to mock HOT 1
- Generate Mocks for Each Protocol Using Sourcery
- AutoMockable does not generate valid swift code for static protocol extensions methods
- Is there a way to add a 'where' clause to a protocol extension?
- Property annotation parsing broken for properties starting with the text `case...` in version 2.1.8 and later HOT 1
- Unwanted generated source file when using forceParse
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sourcery.