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

Informative failure for missing files mapped in universal #83

Merged
merged 2 commits into from
Nov 25, 2013

Conversation

gmjabs
Copy link
Contributor

@gmjabs gmjabs commented Nov 21, 2013

Error out with a useful message if a mapped file in unversal doesn't exist.

From #23

@lightbend-cla-validator

@gmjabs Please sign the latest Typesafe Contributors License Agreement so that we can review and hopefully merge this Pull Request:
http://typesafe.com/contribute/cla

@jsuereth
Copy link
Member

Hmm, this isn't the only manifestation of using universal files....

Do you think we should move the validation somewhere else so it shows up regardless of the zip mechanisms? (e.g useNativeZip would not show this error message).

Otherwise looks great! THanks for the contribution.

@gmjabs
Copy link
Contributor Author

gmjabs commented Nov 21, 2013

Probably should do. I could move the check to stagFiles in the plugin --- that should be common ancestor to all the actual zipping. I'll try that if you think it makes sense.

@jsuereth
Copy link
Member

Well, actually, stageFiles isn't actually a common ancestor, since you don't need to stage before zipping. I'm not quite sure where this check should be, besides in universal:package-bin. We may need to invent a new key "checkedMappings" or something that all the various downstream consumers use and we can put the check between mappings + checkedMappings....

@gmjabs
Copy link
Contributor Author

gmjabs commented Nov 22, 2013

I mis-assumed how things were working... I had trouble getting an interim check task to work with what's in there because I don't understand everything that's going on, but seems like checking mapped files exist when you're makePackageSettings-ing should cover all the cases?

@jsuereth
Copy link
Member

yeah, that's a quite nice place to hook for the message. I agree that I could do a better job with wiring here :). The flow of data doesn't actually exist on the filesystem, but in the keys.

In any case, thanks much for the fix! This looks great.

jsuereth added a commit that referenced this pull request Nov 25, 2013
Informative failure for missing files mapped in universal
@jsuereth jsuereth merged commit d879b76 into sbt:master Nov 25, 2013
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

Successfully merging this pull request may close these issues.

3 participants