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

Several generated files fail when using SDF3 files with a capitalized name. #66

Open
molenzwiebel opened this issue Sep 28, 2021 · 2 comments
Labels
C-Bug Category: bug. Not working as expected O-Windows Operating system: Windows

Comments

@molenzwiebel
Copy link
Contributor

Summary

Several of the files generated by Spoofax during SDF3 compilation will choose to lowercase the generated file name, without also lowercasing the module name. As a result, compilation fails since the module name differs from the file name.

What you did

In src/Exp.sdf:

module Exp

...

What you expected to happen

Either compilation fails (require a lowercase filename), or everything works fine (and support mixed-case filenames).

What actually happened

In generated/statix/signatures/exp-sig.stx (fully lowercase path):

module signatures/Exp-sig
...

In generated/stratego/injections/exp-injections.str2 (fully lowercase path):

module injections/Exp-injections
...

In generated/stratego/pp/exp-pp.str2 (fully lowercase path):

module pp/Exp-pp
...

In generated/stratego/signatures/exp-sig.str2 (fully lowercase path):

module signatures/Exp-sig
...

The modules do not match the names of the files. The contents of the files all reference the capitalized name, but the files are written with a lowercase name. Causes several build errors.

Context

  • Spoofax version: 0.11.11
  • Operating system & version: Windows 10
@molenzwiebel molenzwiebel added the C-Bug Category: bug. Not working as expected label Sep 28, 2021
@Gohla Gohla added the P-High Priority: high. Should take priority over low and non-prioritized label Sep 28, 2021
@Gohla
Copy link
Member

Gohla commented Sep 30, 2021

Actually the chocopy reference project uses capitalized SDF3 module names, and the generated files are not lowercased. For a module named Common in SDF3 I get:

  • build/generated/sources/languageSpecification/statix/signatures/Common-sig.stx with module signatures/Common-sig
  • build/generated/sources/languageSpecification/stratego/injections/Common-injections.str2 with module injections/Common-injections
  • build/generated/sources/languageSpecification/stratego/pp/Common-pp.str2 with module pp/Common-pp
  • build/generated/sources/languageSpecification/stratego/signatures/Common-sig.str2 with signatures/Common-sig

Are the filenames only lowercased on Windows? Edit: this is what I get on macOS.

@Gohla Gohla added the S-Waiting-On-Author Status: awaiting some action (such as code changes or more information) from the author label Oct 1, 2021
@molenzwiebel
Copy link
Contributor Author

They generate as lowercased for me on Windows. All those examples were done on Spoofax 3 0.11.11 on my Windows machine.

@Gohla Gohla added O-Windows Operating system: Windows and removed S-Waiting-On-Author Status: awaiting some action (such as code changes or more information) from the author labels Oct 7, 2021
@Gohla Gohla removed the P-High Priority: high. Should take priority over low and non-prioritized label Oct 21, 2021
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 O-Windows Operating system: Windows
Projects
None yet
Development

No branches or pull requests

2 participants