Comments (4)
👋🏽 @ivanvanderbyl, thanks for filing this issue. The example from the docs doesn't make any assumptions about how consumers modularize generated sources since that decision typically varies by project. Instead, it assumes all generated sources live in the same module. It sounds like you are trying to place mocks in a separate module from the production sources - can you share your module structure?
Also, Buf's Generated SDKs solve this problem automatically through Swift Package Manager if you're interested in checking that out: https://buf.build/solutions/generate-sdks
from connect-swift.
@rebello95 thanks for the quick reply. I am using Buf's generated SDKs, so they are naturally in a separate module. Here's the output of my generated code from BSR:
import Connect
import ConnectMocks
import Foundation
import Ivandev_ObservablePipeline_Apple_Swift
import SwiftProtobuf
/// Mock implementation of `Scanner_V1alpha1_ScannerServiceClientInterface`.
@available(iOS 13, *)
open class ScannerServiceClientMock: Scanner_V1alpha1_ScannerServiceClientInterface, @unchecked Sendable {
It should be importing Ivandev_ObservablePipeline_Connectrpc_Swift
as well as the Apple Swift mocks.
from connect-swift.
Thanks for the info. That should work, so I'm wondering if there was a regression on the Buf side. Can you please ask this question in the Buf Slack? Someone should be able to help debug more there: https://buf.build/links/slack
from connect-swift.
Looks like this is resolved by bufbuild/plugins#1140
from connect-swift.
Related Issues (20)
- tvOS support HOT 1
- Use port number from URL, if present HOT 1
- urlSession warning in xcode 15 beta HOT 5
- Add leading slash to methodPath (while generating code) HOT 3
- Conflicting gRPC Response HOT 10
- Thread Performance Warning Due to Priority Inversion when Initializing NIO Client HOT 11
- Please allow async interceptors HOT 1
- GET Support Through AWS ALB -> gRPC Target Group HOT 4
- Unary GET support HOT 4
- the target 'Connect' in product 'Connect' contains unsafe build flags HOT 2
- Road to v1.0 🥇
- v0.10.1: Missing argument for parameter idempotencyLevel in call... HOT 3
- connect-swift can't compile for watchOS HOT 3
- Create 0.11.0 release HOT 4
- No indication of a failing stream message sending in case of internet unavailability HOT 2
- Is it possible to see the underlying request? HOT 2
- Can we prepend onto the path to allow for how the server is set up? HOT 6
- Inconsistent Timeout Behavior in gRPC with NIOHTTPClient HOT 2
- 0.13.0 Podspec Not Pushed to Spec Repo HOT 1
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 connect-swift.