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

Fix #93 #94

Merged
merged 5 commits into from
Jan 17, 2017
Merged

Fix #93 #94

merged 5 commits into from
Jan 17, 2017

Conversation

nigredo-tori
Copy link
Contributor

Implements changes proposed in #93:

  • Fix scalaJSBundlerPackageJson caching behavior.
  • Expose webpack task caching settings.

I had to use a slightly more involved API for monitored files (webpackMonitoredDirectories and webpackMonitoredIncludeFilter settings, webpackMonitoredFiles task). A single file list setting is not flexible enough, and a file list task that is supposed to be overridden is overkill in most cases.

Fixes #93

New settings:
 - webpackMonitoredDirectories
 - webpackMonitoredIncludeFilter

New task:
 - webpackMonitoredFiles
@scala-jenkins
Copy link
Collaborator

Can one of the admins verify this patch?

@julienrf
Copy link
Contributor

test this please

@scala-jenkins
Copy link
Collaborator

Refer to this link for build results (access rights to CI server needed):
https://scala-webapps.epfl.ch/jenkins//job/scalajs-bundler/103/
Test PASSed.

* @see [[webpackMonitoredDirectories]]
*/
val webpackMonitoredIncludeFilter: SettingKey[FileFilter] =
settingKey[FileFilter]("Filter for files, monitored for webpack launch")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not reuse the existing includeFilter key, scoped to the webpackMonitoredFiles task?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right, of course. Scoped includeFilter is more idiomatic. Will change this shortly.

generatedWebpackConfigFile +:
customWebpackConfigFile ++:
entries.map(_._2) ++:
additionalFiles
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you should also add stageTask.value.data, which contains the .js code produced by Scala.js (the entries contain only the launcher files, which depend on them). I don’t know how we could automate the resolution of the dependencies among .js files…

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do. I seem to have lost this one in the transition.

@julienrf julienrf merged commit 12d4e19 into scalacenter:master Jan 17, 2017
@julienrf
Copy link
Contributor

Awesome, thanks!

@nigredo-tori nigredo-tori deleted the fix-93 branch January 17, 2017 14:12
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.

None yet

3 participants