Comments (8)
Just realized generating the files separately, instead of automagically as part of the build might work (and would be preferable) too, but it has another problem: I'd like to include the CLI tool in the same project, but building such a project currently fails unless there are are .ProtoFile
entries
EDIT: found DesignTimeBuild
prop that can be set to false to avoid codegen kicking in.
from falanx.
One one file is supported as input to Falanx, the import statement should be used for this purpose. Froto does not yet support import although there is beta support for recursing generation on imports
from falanx.
Yes, atm multiple proto in fsproj are not support yet.
Will be nice to support it, so the following works
<ProtoFile Include="a.proto" />
<ProtoFile Include="b.proto" />
These are expected to be completly indipendent, and generator will run two times, generating two .fs
files, so no types are shared
from falanx.
Just realized generating the files separately, instead of automagically as part of the build might work (and would be preferable) too, but it has another problem: I'd like to include the CLI tool in the same project, but building such a project currently fails unless there are are
ProtoFile
entries.EDIT: found
DesignTimeBuild
prop that can be set to false to avoid codegen kicking in.
@et1975 the DesignTimeBuild
cannot be set in projects, otherwise other .net msbuild sdk behaviour are disabled. If not needed (you dont want to use the integration), do not include Falanx.Sdk
, but for this original issue, is easier to fix supporting multiple ProtoFile
s
from falanx.
multiple files adds some unforeseen issues like, if both are importing a type thats used in both messages. A better solution would probably be a composite proto files that imports both etc
from falanx.
if DesignTimeBuild
is not an option, maybe the easy fix would be to treat the empty ProtoFile
as no-op for codegen instead of failing?
from falanx.
multiple files adds some unforeseen issues like, if both are importing a type thats used in both messages. A better solution would probably be a composite proto files that imports both etc
@7sharp9 i think these are different scenario. often the proto have nothing in common, so we can for example create these in nested namespace, like
<ProtoFile Include="a.proto" Namespace="ServiceA" />
<ProtoFile Include="b.proto" Namespace="ServiceB" />
also if these use common types will be duplicated in different namespaces
It's the user who need to choose if create a new proto and import boths, to use shared types.
if
DesignTimeBuild
is not an option, maybe the easy fix would be to treat the emptyProtoFile
as no-op for codegen instead of failing?
@et1975 yes, without <ProtoFile
shouldnt run the generator, not fail the build. I'll check that too
from falanx.
fixed by #98 now multiple <ProtoFile
are supported.
each one is independent from the others
from falanx.
Related Issues (20)
- Usage of external project resources HOT 4
- Single nested enum fails due to no support in fleece HOT 11
- A proto file with a normal field follows by a oneOf results in incorrect generated code
- Missing oneOf property assignment in a message with more than one oneOf
- Recursively nested types fail HOT 7
- Mutual recursion is not supported HOT 1
- Enum with duplicate value produced code with duplicates
- Field ordering test produces out of ordered assignments in json HOT 1
- Running falanx on a proto file with a map in it fails with error HOT 2
- A proto message with primitive field then a map throws a not implemented exception HOT 1
- In a proto message a map followed by a primitive causes an exception HOT 1
- Poor error message HOT 2
- Enum in class is not working: lead.proto.fs(251, 13): [FS0001] No overloads match for method 'OfJson'. HOT 1
- update froto HOT 2
- Is there a way to import well known types?
- Generation fails when an Enum is inside of a oneof block HOT 1
- Move to FsProjects HOT 4
- It failed to build when there's a "bytes" field in the "oneof" HOT 1
- Parse fail for Mapbox vector_tile.proto HOT 1
- Quick question: does this use https://github.com/grpc/grpc-dotnet under the hood? 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 falanx.