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 fixes for the module unification feature flag #6908

Merged
merged 8 commits into from Jul 8, 2017

Conversation

mixonic
Copy link
Member

@mixonic mixonic commented Mar 27, 2017

Several fixes here for the module unification flag, written mostly by @rwjblue with my very watchful supervision.

  • Avoid depending on the app tree being present at all times
  • Create a more realistic src build pipeline
  • Property add src files to the linting system
  • When the src tree is present, defer to src/main.js to declare an application instead of app/app.js.

/cc @rwjblue @Turbo87

@@ -187,7 +187,8 @@ class EmberApp {
let srcPath = this._resolveLocal('src');
let srcTree = existsSync(srcPath) ? new WatchedDir(srcPath) : null;

let appTree = new WatchedDir(this._resolveLocal('app'));
let appPath = this._resolveLocal('app');
let appTree = existsSync(appPath) ? new WatchedDir(appPath) : null;
Copy link
Member

Choose a reason for hiding this comment

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

I'm a little worried about the potential side effects of this change since we don't have that many unit tests for the build pipeline yet and the change is not covered by the feature flag

Copy link
Member

Choose a reason for hiding this comment

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

Ya, we need to flag this, and add tests to cover these changes generally speaking.

@homu
Copy link
Contributor

homu commented Jun 9, 2017

The latest upstream changes (presumably #7118) made this pull request unmergeable. Please resolve the merge conflicts.

@mixonic
Copy link
Member Author

mixonic commented Jul 2, 2017

This code is some of that last stuff we need to see landed in order to support MU behind feature flags.

@rwjblue
Copy link
Member

rwjblue commented Jul 7, 2017

Finally got some time to work on this, and I think its ready for another round of reviews.

  • Rebased on top of current master
  • Removed one super bizarre (and misplaced) test
  • Fixed up the previously failing tests
  • Added a few new integration style tests around lib/broccoli/ember-app.js (we can now confirm that EmberApp#appAndDependencies returns the right things in a fast (< 100ms) broccoli-test-helper style test 🎉 )
  • Guarded all new functionality behind the MODULE_UNIFICATION experiment

Copy link
Contributor

@cibernox cibernox left a comment

Choose a reason for hiding this comment

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

My understanding of this is very small, so I just left a nit pick.

@@ -1127,8 +1183,11 @@ class EmberApp {
let config = this._configTree();
let templates = this._processedTemplatesTree();

let srcTree = experiments.MODULE_UNIFICATION ? this._processedSrcTree() : null;
Copy link
Contributor

@cibernox cibernox Jul 8, 2017

Choose a reason for hiding this comment

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

Perhaps move the experiments.MODULE_UNIFICATION check to _processedSrcTree to make it a noop and just call it here blindly?

@mixonic mixonic merged commit ba73fc8 into master Jul 8, 2017
@mixonic mixonic deleted the module-unification-fixes branch July 8, 2017 17:58
@mixonic mixonic restored the module-unification-fixes branch July 8, 2017 18:02
@locks locks deleted the module-unification-fixes branch July 9, 2017 23:40
@twokul
Copy link
Contributor

twokul commented Jul 18, 2017

@mixonic @rwjblue I must be reading the code wrong? experiments.MODULE_UNIFICATION always returns something (__module-unification__ [id=EMBER_CLI91203924408] for example). That means check like this won't work:

if (!experiments.MODULE_UNIFICATION) {
  return null;
}

and you always have to pair it with another guard !this.trees.src

@Turbo87
Copy link
Member

Turbo87 commented Jul 18, 2017

@twokul experiments are disabled on the beta and release branches

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

Successfully merging this pull request may close these issues.

None yet

6 participants