Issues with isobuild following Project migration from v1.2.1 to v1.3/1.4

Hello,

I’d like to raise your attention to two key differences in the way isobuild works between v1.2.1 to v1.3.5.1:

  1. Meteor watches packages files that are not referenced by package.js .
  2. Meteor build plugins build files not referenced by package.js .

These two differences caused me some issues when upgrading to v1.3.5.1 (before upgrading to v1.4).

I refined an example project that demonstrate the issues.

In the repository, you can find two Meteor projects, one of v1.2.1 and another of v1.3.5.1 (also v1.4.1.1, where the results are similar to v1.3.5.1).

In each of these projects I’ve installed a package ‘example:aaa-compiler’ with build plugin that uses the legacy build plugins api (which my legacy code and 3rd party packages that I am using still use) to build files that ends with .aaa , the build process adds to the bundle the js code: “console.log(‘I should be printed only once!’)”.

example:aaa-compiler’s package.js has only the build plugin, and reference only to the build plugin file.

In the package folder there’s a /docs/example-aaa folder with example aaa file.

That example file is symlinked to the app root in both projects.

Running results:

V1.2.1 - Web

V1.2.1 - Server

V1.3.5.1 - Web

V1.3.5.1 - Server

Workaround:

As a workaround, for now, I added .# prefix to the folder that shouldn’t be watched. This is a very hacky/not-documented workaround, which make the folders hidden for regular operations which might interfere with the project maintenance.

Questions:

  1. Why packages files that are out of package.js scope are watched? Issues with that:
    1.1 If I have big documentation folder (think something > 5mb with lots of files) why should it be watched?
    1.2 Maybe this is a cause for increase in build time in > v1.2?
    1.3 I used to have common code residing in packages which I symlinked to the main app, now I can’t do that without getting warnings from the builder (since it now watch duplicates).
  2. Is there a reason why these out-of-scope files are built? Test folders and documentation folders under a package folder can’t assume they are isolated and out of scope any longer?
  3. Is this a bug or intended behaviour? I couldn’t find any serious discussion about this issue, or any place where it’s documented.

Thanks,
-Daniel Chcouri

Exact same issue in v1.4.1.1, test repository updated .

@benjamn is working on performance here: https://github.com/meteor/meteor/pull/7668 You could try the beta from 1.4.2 to see if it’s fixed. Otherwise this looks like a good reproduction to show there.

See also: Meteor 1.4.2 beta - solid 2x improvement in rebuild speed!

1 Like