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

[etlas] Add field build-uberjar: #305

Closed
rahulmutt opened this issue Apr 13, 2017 · 7 comments
Closed

[etlas] Add field build-uberjar: #305

rahulmutt opened this issue Apr 13, 2017 · 7 comments
Labels

Comments

@rahulmutt
Copy link
Member

The workaround is to make an executable with a stub main function.

@rahulmutt rahulmutt added this to the Eta v0.1.0 milestone Apr 13, 2017
@rahulmutt rahulmutt changed the title [etlas] Make uberjar-mode work for libraries as well [etlas] Add field build-uberjar: Apr 14, 2017
@jneira
Copy link
Collaborator

jneira commented Jun 20, 2017

hi, what do you mean with "add field"?

@rahulmutt
Copy link
Member Author

It means to be able to specify build-uberjar: in the Cabal file.

executable
   ...
   build-uberjar: True

OR

library
   ...
   build-uberjar: True

(While False will be the default value.)

So this change involves:

  1. Adding the field to the Cabal fields parser and modifying the existing data types like LocalBuildInfo or any of the related types to store that info.
  2. Updating Distribution.Simple.ETA.buildLib/Exe to check for that field and send the appropriate flags to the eta compiler.

@jneira
Copy link
Collaborator

jneira commented Jun 21, 2017

Ok, the change would suppose the deprecation/elimination of -enable-uberjar-mode config option?

Anyway i'll try to take a look.

@rahulmutt
Copy link
Member Author

Deprecation and eventual elimination, yes.

Sounds great!

@jneira
Copy link
Collaborator

jneira commented Jun 26, 2017

Maybe related with #285: with the new way maybe clean the dist folder dir would not be required?

OTOH i am thinking in a differente approach to implement this, taking in account #267 and #265:
If we added a new value deployment-mode=uberjar (as suggested in #267), we would not need another field in the config file.
Moreover, with this option and maven-provided (as in #290) we will have the spark mode covered, no?

@rahulmutt
Copy link
Member Author

rahulmutt commented Jun 26, 2017

So in light of the recent changes (in the going-stackless branch), the story for how we're going to handle concurrency has become very clear. Which means compiling the etlas-cabal library with Eta itself is just a matter of porting directory and process properly and handling some of the platform-specific details.

What this means is that we'll be able to support build-type: Custom and we can make packages for each deployment mode (supporting uberjar deployment within the etlas-cabal package itself since it's common) and it's just a matter of adding a dependency and setting up the Setup.hs file accordingly. So we can defer all the issues you mentioned until after that branch gets merged to master.

And I agree with your point that making a uberjar is simply another mode of deployment and should be unified with that concept.

@rahulmutt
Copy link
Member Author

It turns out this is not necessary.

You can create a cabal.config with a single line:

uberjar-mode: True

To get the same effect.

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

No branches or pull requests

2 participants