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

[BUG] erpcgen does not work with multiple files #422

Open
2 tasks done
sillydan1 opened this issue Apr 18, 2024 · 1 comment
Open
2 tasks done

[BUG] erpcgen does not work with multiple files #422

sillydan1 opened this issue Apr 18, 2024 · 1 comment
Labels

Comments

@sillydan1
Copy link

sillydan1 commented Apr 18, 2024

Describe the bug

When invoked with multiple files the erpcgen tool only generates files for the first file.

I would argue that the help page indicates that it is an official feature that you can provide multiple .erpc files:

usage: erpcgen [-?|--help] [-V|--version] [-o|--output <filePath>]
               [-v|--verbose] [-I|--path <filePath>] [-g|--generate <language>]
               [-c|--codec <codecType>] [-p|--package <packageName>] files...

To Reproduce

Say I have two .erpc files; foo.erpc and bar.erpc, then when I invoke erpcgen:

erpcgen -g c src/erpc/foo.erpc src/erpc/bar.erpc

Then it only generates files for foo.erpc.

Expected behavior

I would expect to have foo_{client,interface,common,etc}.cpp, as well as bar_{client,server,common,etc}.cpp files in the output directory.

Desktop (please complete the following information)

  • OS: GNU/Linux
  • eRPC Version: 1.12.0

Steps you didn't forgot to do

  • I checked if there is no related issue opened/closed.
  • I checked that there doesn't exist opened PR which is solving this issue.

Additional Notes

A quick and dirty "solution" would be to have a single main.erpc file that imports the other .erpc files, but that is suboptimal due to all the generated files would then be named main_{client,interface,common,etc}.cpp and that just results in confusion when #include-ing and compilation would compile potentially unused functions.

EDIT: Probably the easiest solution would be to simply say that compiling multiple files is not supported and update the help message.

@sillydan1 sillydan1 added the bug label Apr 18, 2024
Copy link

Hi eRPC user. Thank you for your interest and welcome. We hope you will enjoy this framework well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

1 participant