Commit Graph

598 Commits

Author SHA1 Message Date
David Glasser
75a4cf3199 Merge branch 'devel' into shark
Conflicts:
	packages/templating/deftemplate.js
	packages/templating/package.js
	packages/templating/plugin/html_scanner.js
	packages/test-in-browser/driver.js
	tools/packages.js
2013-08-01 17:17:18 -07:00
David Glasser
e823b1e54a Don't watch files for reload until after starting the server.
Specifically, don't watch until after serverHandle points to the NEW
process. This way, if the watcher files, we are sure to kill the new process,
not fail to kill it because serverHandle is still pointing at the old process or
no process. The old behavior led to sometimes failing to kill the server; while
it would eventually die due to failed keepalive, the new servers would also fail
due to EADDRINUSE.

This change is possible because unlike the only dependencyInfo, WatchSets are
completely self-contained (there's no "... and it should look like it did the
first time" involved).

While we're at it, make restartServer always stops the watcher, and clear some
variables after they're used.

Fixes #1247.
2013-08-01 16:11:06 -07:00
David Glasser
e483721602 Remember the library resolution of packages used by the plugin program itself. 2013-08-01 12:41:49 -07:00
David Glasser
8de4b48d61 document and rename pluginProviderPackageDirs 2013-08-01 12:17:58 -07:00
David Glasser
2c33d54e5e BUILT_BY bump 2013-08-01 12:17:58 -07:00
David Glasser
17699eb399 Rebuild a package when its dependencies resolve to a different path.
Also simplify a bunch of library code that thought it might have to rebuild
warehouse packages, now that the warehouse contains unipackages.
2013-08-01 12:17:58 -07:00
David Glasser
ecd94142c8 Save to buildinfo the library resolution of all "use"d package.
We call these the pluginProviderPackages because these are the packages that, if
they change, could affect the set of plugins available to this package (and thus
require it to be rebuilt).
2013-08-01 12:17:58 -07:00
David Glasser
360e654f63 Don't crash when updating unpinned apps. 2013-08-01 12:17:45 -07:00
David Glasser
8aa63bcb3a Cleanups for PR 1263:
- Display proper caller location (requires extending useMyCaller to take a
  number)

- Recover by only returning valid 'where's so we don't crash later.
2013-08-01 00:29:14 -07:00
Andrew Mao
940a8f3250 added some checks for the where argument 2013-08-01 00:15:41 -07:00
David Glasser
f276b34148 comment about updating BUILT_BY when js-analyze changes 2013-07-31 23:50:31 -07:00
David Glasser
1d45b0bfa8 update comments 2013-07-31 23:26:51 -07:00
David Glasser
625d98768f fix comment 2013-07-31 23:17:52 -07:00
David Glasser
974de6bac3 Update BUILT_BY so everything gets rebuilt. 2013-07-31 22:59:46 -07:00
David Glasser
fac5e219fd Don't put the old pluginWatchSet onto a Package until we know we're using the
unipackage.
2013-07-31 22:56:58 -07:00
David Glasser
52948bed50 fix HTML sort hack. run-tools-tests passes! 2013-07-31 22:56:57 -07:00
David Glasser
a2803fd111 watch nonexistent dirs better 2013-07-31 22:56:57 -07:00
David Glasser
1a5d695ee4 fix minor bugs. bundler-test passes! 2013-07-31 22:56:57 -07:00
David Glasser
1b82376b4b in theory, this might work 2013-07-31 22:56:57 -07:00
David Glasser
f84fc21e8f checkpoint for initFromAppDir rewrite 2013-07-31 22:56:38 -07:00
David Glasser
ea22b3ab02 Checkpoint for actually using WatchSets.
Have not yet touched initFromAppDir.
2013-07-31 22:56:38 -07:00
David Glasser
3f5edbfae9 remove dead builder.copyDirectory({depend:true}) code 2013-07-31 22:56:38 -07:00
David Glasser
ad5b20990e get watch-test to pass 2013-07-31 22:56:38 -07:00
David Glasser
5ac411652a twiddle exports 2013-07-31 22:56:38 -07:00
David Glasser
4dc5aaf683 rewrite Watcher 2013-07-31 22:56:38 -07:00
David Glasser
5b76eb7a85 watcher rewrite: Add WatchSet and readDirectory. 2013-07-31 22:56:38 -07:00
Emily Stark
8202e86a6a Use blank client targets for all "traditional" programs that need it, not just
the first.
2013-07-31 19:25:44 -07:00
David Glasser
097b261518 Don't need to merge pluginDependencies into sliceDependencies for checkUpToDate.
In fact, each slice's dependencies already contains pluginDependencies (see
after the linker.prelink call in Slice.build, and recall that a package's
plugins are always active in itself).
2013-07-30 22:49:57 -07:00
David Glasser
c11a791eb2 Remove overzealous ||{}. 2013-07-30 19:48:34 -07:00
David Glasser
2a750e64de build-package-tarballs chooses version based on buildinfo.json. 2013-07-30 15:32:06 -07:00
David Glasser
98db63dd1b Don't lose pluginDependencyInfo when round-tripping through unipackages.
Now, modifying the source of a plugin (or anything that affects it) will
recompile all packages that depend on it.
2013-07-30 14:44:30 -07:00
David Glasser
a86a00b119 Error if you try to save an unbuilt package as a unipackage. 2013-07-30 14:31:08 -07:00
David Glasser
3ce09d8371 Factor out dependencyInfo RegExp/string toggling. 2013-07-30 14:24:32 -07:00
David Glasser
36492a23ac Serialize dependency info by slice.
This makes saveAsUnipackage -> initFromUnipackage less lossy. Also means that,
eg, plugins don't end up dependent on tests in packages they use.

Use of the json file path as the key in sliceDependencies is kind of hacky, but
I'm viewing buildinfo.json as less of a standardized format as unipackage.json.
2013-07-30 13:55:55 -07:00
David Glasser
9b24174e08 Changing package/foo/package.js rebuilds all packages that use 'foo'.
That's because this change could introduce or remove a plugin, which affects how
the dependent package is built (eg, could change an extension between being
handled vs static).

Does not affect transitive dependencies.
2013-07-30 11:16:44 -07:00
David Glasser
62626bf33d Set $METEOR_DEBUG_BUILD to see what jobs are run. 2013-07-30 11:15:15 -07:00
David Glasser
fbfd21c07b Comment updates. 2013-07-30 01:00:01 -07:00
David Glasser
1d568abc9c Add newline to end of "no galaxy" error. 2013-07-29 23:44:41 -07:00
David Glasser
a319aa7f9e Implement 'bundle --debug'. Fixes #748. 2013-07-29 23:40:55 -07:00
David Glasser
b04818221e Move source map instructions comment above imports. 2013-07-29 18:07:12 -07:00
David Glasser
1202b781ef Rename 'native' to 'os', in arch names.
Requires a BUILT_BY bump, unless you really want to fail to load your plugins
and crash.
2013-07-29 15:39:50 -07:00
David Glasser
e3c18578e3 Call upgraders at "meteor update" time.
Add "app-packages" to the list of upgraders in a release JSON.
2013-07-29 10:57:06 -07:00
Emily Stark
c74e969892 Move delete app logic into galaxy 2013-07-29 10:16:56 -07:00
David Glasser
19012cf58a "meteor list": completely ignore internal packages 2013-07-26 19:33:25 -07:00
David Glasser
4e222d8e26 The standard app packages are brought in explicitly now.
.meteor/packages in new apps now contains "standard-app-packages", which implies
the standard set of packages like mongo-livedata. There is no special-casing in
initFromAppDir.  This line has been added to all the examples, etc.

There's a new concept of "upgraders".  "meteor run-upgrader app-packages" will
add standard-app-packages to the app, as well as all of the package in the app's
packages/ directory (an unrelated change since 0.6.4). This will be integrated
soon with "meteor update"; run-upgrader is essentially for testing.

project.add_package no longer adds packages that are already there.
2013-07-26 19:02:12 -07:00
Emily Stark
307789a261 Implement deploy -D for galaxy apps.
Basically just calls stopApp followed by unlistApp.
2013-07-26 16:51:50 -07:00
David Glasser
4b3cb9d305 Rename api.exportSymbol -> api.export. 2013-07-25 18:54:43 -07:00
David Glasser
691bd63f9c Include handlebars and random in the standard app packages list. 2013-07-25 18:54:43 -07:00
David Glasser
3a7eac6dca Declare _FooTest symbols as testOnly; they are only visible to tests.
They are visible to *all* tests, not just the package's own tests.
2013-07-25 18:54:42 -07:00
David Glasser
e4c568b1e1 Merge exports list with package variables in slice JSON.
This implies that all exports are package variables, which made underscore,
jquery, and htmljs (which explicitly assigned to fields on the global variable)
break. We now properly encapsulate these packages (except for window.jQuery,
which we let sneak out because bootstrap wants it).  This means that packages
that want _ need to use underscore, and packages that want $ need to use jquery.
Also, you can't use _ in minimongo $where any more (matching mongod).
2013-07-25 18:54:42 -07:00