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

executing fbec command(C#) with multiple .fbe files gives some missing dependency errors #68

Closed
josep-calull opened this issue May 19, 2022 · 13 comments

Comments

@josep-calull
Copy link

Attached a simple vs project.
Paragon.DoT.zip

For example, have a look at this file:

  • Network/Messages/dot_network_messages.cs

All files were generated using this .bat file:
Run the Paragon.DoT\DoT\run-fbe.bat file and you will know what do I mean.

See if this is possible to fix or if it is better to use one BIG .fbe FILE.

Apart from that, would be nice to add support for subpackages using '.' in C#.

Thank you chronoxor.

@chronoxor
Copy link
Owner

The recommended way is to keep all fbe-proto files and generated source in one directory. I've just fix your sample. Please see attached.
Paragon.DoT.zip

@josep-calull
Copy link
Author

Waw, I'm Impressed!
Many thanks!

Do you think you will add support for csharp subnamespaces?
Thanks.

@chronoxor
Copy link
Owner

This is already done in Java using domain com.chronoxor will generate package com.chronoxor.proto;. I think it is possibe to do the same for C#. I'll look into it. You'll get domain DoT -> namespace DoT.dot

@josep-calull
Copy link
Author

Would be nice if:

package DoT_Logic =>=> namespace DoT.Logic{}
package DoT_Logic_Commands =>=> namespace DoT.Logic.Commands{}

It is not essential but would be amazing.
I'll close this thread.

Thank you very much Chronoxor.

@chronoxor
Copy link
Owner

Fixed in FBE 1.10.0.0. Please see your sample updated:
Paragon.DoT.zip

@josep-calull
Copy link
Author

I'll try it out now.
Excellent & fast support.

Thank you!

@josep-calull
Copy link
Author

Have a look at these:
Main think I did is put a 'sub-domain' per .fbe file.
The generated code is weird.
See if it is possible to fast fix, otherwise nvm.

Thank you again Chronoxor.

Paragon.DoT2.zip

@chronoxor
Copy link
Owner

Domain should be the same for all protocols (e.g domain DoT). All packages should have the same level (without dots in names). This is come because we need to support lots of platforms some of them have no namespace concepts.

In you case I suggest having the following hierarchy:

domain DoT

package Common offset 1
package Logic offset 100
package LogicCommands offset 500
package Network offset 10000
package NetworkMessages offset 11000

@josep-calull
Copy link
Author

josep-calull commented May 20, 2022

Okey! This will work for me.
Thanks for having a look Chronoxor.

@josep-calull
Copy link
Author

Sorry to bother you again. I did what you said but.. hehe, still missing some dependencies.
Paragon.DoT3.zip

@chronoxor
Copy link
Owner

Paragon.DoT4.zip

@chronoxor
Copy link
Owner

When inheriting messages/structs from import don't forger to add corresponding package prefix - : Network.Message

@josep-calull
Copy link
Author

Aha!
Now It is perfeeeeeeeeeeeect!
Thanks

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

No branches or pull requests

2 participants