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

Support file globs and/or @file in java-sources stanza #74

Open
jneira opened this issue Sep 11, 2018 · 6 comments
Open

Support file globs and/or @file in java-sources stanza #74

jneira opened this issue Sep 11, 2018 · 6 comments

Comments

@jneira
Copy link
Collaborator

jneira commented Sep 11, 2018

  • To let users refer to directories (like src/main/java/** for example)
@rahulmutt
Copy link
Member

Would love this as well!

@jneira
Copy link
Collaborator Author

jneira commented Sep 13, 2018

Well, there is a workaround and moreover i am not sure if file globs is enough cause in windows the call to javac fails with 20 files or so. If we use file globs to extract names and then pass them to javac we will hit the issue quickly (javac does not support file globs.. sic!)

The way to pass multiple java files to javac is to create a file with the list of java sources to be compiled, then refer to that file using @file notation

So if you set java-sources: @classes.java in the cabal file and creates a file classes.java in the project directory with a list of java files, it works!. You have to name @classes.java to cheat eta and make it believe that it is a source file.
I'll would add support for the @file syntax in etlas/eta instead file globs.

@jneira jneira changed the title Support file globs in java-sources stanza Support file globs and/or @file in java-sources stanza Jan 15, 2019
@jneira
Copy link
Collaborator Author

jneira commented Jan 15, 2019

We can take in account that etlas sdist should include all the source files in the @file

@jneira
Copy link
Collaborator Author

jneira commented May 3, 2019

Maybe we can reuse haskell/cabal#5996

@rahulmutt
Copy link
Member

@jneira That looks pretty cool. Do you mean to include that feature in the Eta compiler itself or Etlas?

@jneira
Copy link
Collaborator Author

jneira commented May 6, 2019

Mmmm, good question, it would be helpful in eta too

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