Commit Graph

30 Commits

Author SHA1 Message Date
Slava Kim
b0f51a62f3 Don't access Isopack directly because of potential problems of circular
dependencies
2015-02-05 16:27:29 -08:00
Slava Kim
d459abd0be Normalize "new Isopack()" calls so they are easier to grep in the future 2015-02-04 12:44:03 -08:00
Sashko Stubailo
1ca78dd7c9 Use colonConverter instead of old utils function 2015-01-21 21:25:01 -08:00
David Glasser
6a55c35837 Implement soft refresh.
Fixes #3213.

Also ameliorates the memory leak of parsedSourceMaps in
files.runJavaScript (because now we don't reload unchanged plugins).
2014-12-17 00:13:07 -08:00
David Glasser
f6f4803a9a refactor: move pluginProviderPackageMap in Isopack
This also un-breaks soft refresh for troposphere packages:
previousIsopack was accidentally being set to an
{isopack,pluginProviderPackageMap} object, and so the "can we reuse the
previous one" check was never actually passing.
2014-12-17 00:13:07 -08:00
Sashko Stubailo
e7167e5257 Factor out almost all fs. and path. calls in the tool
This will be useful when we want to be smart with windows file paths later
Also, all of the file calls are asynchronous with fibers now, which comes with
many benefits.

This is a combination of 23 commits. Original messages:
Wrap a large number of fs calls inside files.*

Convert a few more fs calls to files.*

More moving fs.* to files

Implement read/write streams and open/read/close

Get rid of fs from auth.js

Remove fs and unused imports from catalog-local and catalog-remote

Remove unused imports from catalog.js

Replace a whole lot of fs calls

Fix error

Migrate a lot more fs. calls to files.

Add a temporary symlink method

Convert old test to files.*

Use files.pathX instead of path.x everywhere

Replace path.x to files.pathX in tests

Small fixes to files.js and one rename

Make cleanup run in a fiber

Make wrapping functions take function name in case we need it

Add some timeouts and stuff to HCP tests

wrapFsFunc also makes a sync version of the function

Sometimes you just don't want to yield!

Make sure JsImage readFromDisk doesn't yield

Remove unused imports from npm test

Change order of test now that some things don't yield

Fix missing files import, and add a debug error printout
2014-12-15 15:32:06 -08:00
David Glasser
809b2b69f5 Don't compile web.cordova unibuilds unless needed
Specifically, we only compile them if there's a cordova platform in the
current project, or if we are publishing the package.

(Ideally, we wouldn't require every published package to have
web.browser and web.cordova unibuilds --- we'd just publish a 'web'
unibuild unless there's actually a difference between the two. But we
are not there yet.)

This adds an extra flag to isopack-buildinfo.json, so that we know to
rebuild all the isopacks when we add the first cordova platform (or
remove the last cordova platform).

The implementation around publish is a little clunky; if you're in a
non-Cordova app and run meteor publish, it will rebuild all the packages
with web.cordova, and the next time you prepare the app it will rebuild
them again without it. It does work though.

Fixes #3274.
2014-12-11 22:26:29 -08:00
David Glasser
79527ccd9c Don't crash on circular dependency
Previously, we would register the circular dependency error properly
with buildmessage, but then try to build the package with a circular
dependency anyway, leading to a crash.

Fixes #3280.
2014-12-11 21:31:41 -08:00
David Glasser
021e9f767d Don't include line number comments in isopackets
The extra legibility is not as useful for code that is always part of
core as it is for user's packages, and it actually has a notable (25%)
effect on isopacket load time.

Fixes #3218.
2014-12-03 12:38:20 -08:00
David Glasser
a937aa606d Soft refresh, versioned packages only
First half of #3213.
2014-12-01 19:48:06 -08:00
David Glasser
7d856564fa fix releases tests
This mostly consisted of making sure we were building enough packages to
run the skeleton app.  Also, since we currently only know how to make
one tool at a time, dropped all the tests that checked the tool version
with --long-version.  (Before 0.9.0 there were multiple tool versions
here and you could actually tell the difference.)
2014-11-25 09:06:28 -08:00
David Glasser
75f628bab4 Fix building plugins in release builds
We need to load the transitive closure of the plugin in order to compile
the package with the plugin. But we weren't following the transitive
closure when loading prebuilt packages. This fixes that.
2014-11-25 09:06:27 -08:00
David Glasser
c55c76280b save pluginProviderPackageMap when compiling
move PackageMap to IsopackCache constructor
2014-11-25 09:06:24 -08:00
David Glasser
12851424d4 remove completed XXX #3006 comments 2014-11-25 09:06:21 -08:00
David Glasser
5fcab5c42d fix 'meteor rebuild' 2014-11-25 09:06:20 -08:00
David Glasser
f0ff76a24b watch local package search dirs 2014-11-25 09:06:18 -08:00
David Glasser
19c9536bf5 Correctly watch broken packages 2014-11-25 09:06:18 -08:00
David Glasser
4f1da93bc4 add IsopackCache.allLoadedLocalPackagesWatchSet 2014-11-25 09:06:17 -08:00
David Glasser
ee649d3bda Move isopack-compiler back to compiler 2014-11-25 09:06:15 -08:00
David Glasser
738a4a00b8 Escape package names in IsopackCache paths 2014-11-25 09:06:13 -08:00
David Glasser
a1268b8d6b Just build all dependencies before a package
The old code failed because versioned packages (with or without plugins)
weren't loaded before compileUnibuild, and the eachUsedUnibuild call
inside it threw. We could load plugin'd versioned packages, but I also
realized that the old getPackagesToBuildFirst didn't find you plugins
that were pulled in via implies. This way is simpler.
2014-11-25 09:06:12 -08:00
David Glasser
3983cabb78 Deal better with build failures 2014-11-25 09:06:11 -08:00
David Glasser
8aefc5b46f Use IsopackCache to build isopackets 2014-11-25 09:06:11 -08:00
David Glasser
16d8a8e301 Read isopack-buildinfo.json; kill buildinfo.json 2014-11-25 09:06:11 -08:00
David Glasser
ab4e3abc7b The cache actually caches! 2014-11-25 09:06:11 -08:00
David Glasser
63a3ec64c7 Don't need to build deps of versioned packages 2014-11-25 09:06:10 -08:00
David Glasser
685df046d0 write out isopack-buildinfo.json
our replacement for buildinfo.json

it's not right yet: unibuilds don't merge in the plugin watchset.
2014-11-25 09:06:10 -08:00
David Glasser
090f131bc1 Cache isopacks to disk, uselessly.
Uselessly because we don't include any build info, so how would you know
when to rebuild?
2014-11-25 09:06:10 -08:00
David Glasser
23f5e354d0 I can compile everything! 2014-11-25 09:06:09 -08:00
David Glasser
d6cca3a89e First steps towards an IsopackCache.
It comes up with the right order to build and load packages, and loads
prebuilt packages. It does not yet build packages.
2014-11-25 09:06:09 -08:00