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

Include definitions from other files #52

Open
iilyak opened this issue Jul 13, 2023 · 1 comment
Open

Include definitions from other files #52

iilyak opened this issue Jul 13, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@iilyak
Copy link

iilyak commented Jul 13, 2023

Some of my structures are re-used in multiple places. Also I don't want to put dozens of structures into one giant file. I would prefer to have one file per packet. However currently I don't see a way to refer to packet defined in another file. Of cause the parser fails with "undeclared typedef identifier ...".

@hchataing hchataing added the enhancement New feature or request label Aug 12, 2023
@hchataing
Copy link
Collaborator

Can you share an example of what you would like to achieve with PDL ?

We are not planning on implementing a module system for PDL right now, as it generates difficulties down the line for resolving import paths. Right now the generator does not know about the output path for the generated module, nor would it know about the location of modules to import external definitions from.

As a first measure, we could facilitate the creation of large modules with shared definitions by adding an embed statement to copy the definitions from one file to another, and remove duplicates. Would that be enough for your use case ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants