Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New mpc(MessagePackCompiler) #396

Closed
wants to merge 9 commits into from
Closed

New mpc(MessagePackCompiler) #396

wants to merge 9 commits into from

Conversation

neuecc
Copy link
Member

@neuecc neuecc commented Feb 25, 2019

completely new code-generator.

-i, -input: Input path of analyze csproj or directory, if input multiple csproj split with ','.
-o, -output: Output file path(.cs) or directory(multiple generate file).
-c, -conditionalSymbol: [default=null]Conditional compiler symbols, split with ','.
-r, -resolverName: [default=GeneratedResolver]Set resolver name.
-n, -namespace: [default=MessagePack]Set namespace root name.
-m, -useMapMode: [default=False]Force use map mode serialization.
-ms, -multipleIfDiretiveOutputSymbols: [default=null]Generate #if-- files by symbols, split with ','.

may solves #355, #386.

Currently this implementation is very poor.
But especialy new directory input works fine on Unity(maybe).

You can try binary from here: https://www.dropbox.com/s/4nj90rrx7lsu70v/MessagePackCompiler.zip?dl=0
(19-02-26 17:52(JST) update, support valuetuple, output dir modified)

@jsteinich
Copy link
Contributor

I hit a couple issues using this.

  1. A type that exists in a reference library ended up being not fully qualified in the generated code. This was a build error. If it makes any difference, the type was in a parent class containing unions of its subclasses.
  2. Formatters aren't being generated for types that exist in a referenced project. It happens to be that all of the missing types are enums, but it also just happens that those are the only types referenced. There are no build time errors for this.

@neuecc
Copy link
Member Author

neuecc commented Mar 4, 2019

thanks for reporting, i'll investigate it.

@jsteinich
Copy link
Contributor

I got a chance to take another look at this and it still has issues. Looking at the code it makes sense as there is a TODO to implement package references.
Looking at how to do that seems to end up with something very similar to what the universal code generator is doing.

I'm curious which version of the code generator is intended to be used going forward.

@AArnott
Copy link
Collaborator

AArnott commented Oct 22, 2019

Is this obsolete by #591?

@neuecc
Copy link
Member Author

neuecc commented Oct 24, 2019

yes, now ported to #591.

@neuecc neuecc closed this Oct 24, 2019
@AArnott AArnott deleted the new-mpc branch October 24, 2019 14:12
@neuecc neuecc mentioned this pull request Nov 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants