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

Source exports should be language specific #125

Open
Apanatshka opened this issue Feb 10, 2023 · 0 comments
Open

Source exports should be language specific #125

Apanatshka opened this issue Feb 10, 2023 · 0 comments
Labels
C-Bug Category: bug. Not working as expected C-Enhancement Category: enhancement. Improvement

Comments

@Apanatshka
Copy link
Contributor

Summary

When you use export sources to depend on them in another project, you use something like:

stratego {
  source = files {
    export-directory = ./src/
    export-directory = ./build/generated/sources/metalang/stratego
    sdf3-statix-explication-generation = true
  }
}

This should provide access to only the stratego files in those directories, when another project adds a build-dependency to it. But instead all files are passed along. This results in e.g. src/start.sdf3 being found in the other project, and Stratego files are generated from it in the depending project. Whereas that's what we are exporting build/generated/sources/metalang/stratego. These duplicate Stratego files cause problems (e.g. duplicate definitions with types).

What you did

Create two basic, tiny, spoofax projects, put files of the first in a subdir of src for clarity, add Stratego exports to the first, a build-dependency on the first in the second, build the second, notice files generated with the subdir name of the first.

What you expected to happen

SDF3 files get ignored in an export-directory only mentioned in the Stratego block.

What actually happened

SDF3 files are included in the source-generation of a project that imports the project that exports a directory that contains an SDF3 file, even though the dir was exported in the Stratego block.

Context

  • Spoofax version: development version of 40b662f
  • Operating system & version: MacOS Mojave 10.14.6

Additional information

@Apanatshka Apanatshka added C-Bug Category: bug. Not working as expected C-Enhancement Category: enhancement. Improvement labels Feb 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-Bug Category: bug. Not working as expected C-Enhancement Category: enhancement. Improvement
Projects
None yet
Development

No branches or pull requests

1 participant