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

[spec] Add an entry for codegen files #34

Open
Minimonium opened this issue Oct 4, 2019 · 2 comments
Open

[spec] Add an entry for codegen files #34

Minimonium opened this issue Oct 4, 2019 · 2 comments

Comments

@Minimonium
Copy link

Sometimes projects have sources that are not C++ but need to be generated into one. But they're also not data, they're still sources, so it'd be incorrect to put them alongside assets.
An example of such could be QML code. According to the [src.layout] section it'd be incorrect to put it alongside the C++ code.
What about adding a special section for a code generation folder?

@Quincunx271
Copy link
Contributor

I'm not sure that src.layout intends to forbid placing the qml alongside C++ code. It does only talk about C and C++, but in a polyglot environment, it makes sense to allow placing source code in other languages alongside the C or C++ sources. I've been doing this.

It also does make sense to allow different languages to be separated into different directories. Perhaps allowing different non-C++ source directories could make sense (e.g. a qml/ directory, a rust/ directory, etc.), although it might make sense to survey some polyglot projects out there before deciding what the right choice is.

@Minimonium
Copy link
Author

I do agree, better would be to say that such use case is underspecified.

In my current projects, I use a qml/ directory alongside the src/ directory. Mixing it bloats source trees since they're not a 1 to 1 mirror of each other, but they do share the same prefix folder structure: src/company/project/... and qml/company/project/....

I'd wish about a note on that use case in the spec to remove hesitation when doing so. 🙂

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