Commit Graph

12652 Commits

Author SHA1 Message Date
David Greenspan
fd8eb4028b Test pointing out formula gen trade-off 2015-01-21 11:56:23 -08:00
David Greenspan
7e826a3394 More atMostOne tests 2015-01-21 11:56:22 -08:00
David Greenspan
0897883413 Logic.atMostOne works! Clause generation is clever
My program is surprising me with its concise generated CNF!  That is fun.
2015-01-21 11:56:22 -08:00
David Greenspan
9e55f9f7dc Finish _generateFormula and require/forbid
…in terms of what is which’s responsibility.

Allow Logic.xor(…) to return a term in the one-arg case.  From now on, helpers like Logic.and, Logic.or, and Logic.xor don’t have to return AndFormulas, OrFormulas, or XorFormulas; they can return other formulas or terms if they like, resulting in fewer intermediate variables.

This completes nested formula generation, so now we are ready for atMostOne.
2015-01-21 11:56:22 -08:00
David Greenspan
0da6748f5a Xor uses termifier.generate 2015-01-21 11:56:22 -08:00
David Greenspan
b6ffa2b808 Give generateClauses access to formulaToTerm
can call either t.clause or t.term
2015-01-21 11:56:22 -08:00
David Greenspan
f31f9c7bcb Improve generation of require/forbid of formula
eg improve require(f);require(f) or require(f) then use f
2015-01-21 11:56:22 -08:00
David Greenspan
fdd4d22c8d Combine require and forbid impls 2015-01-21 11:56:21 -08:00
David Greenspan
1f930713cc Tweaks to clause generation 2015-01-21 11:56:21 -08:00
David Greenspan
aad244be7a Finish xor tests 2015-01-21 11:56:21 -08:00
David Greenspan
6755bdaed3 Xor and start of tests 2015-01-21 11:56:21 -08:00
David Greenspan
3281ac7d9e Add Logic.and; fix formula generation
We weren’t generating formulas when they were used by other formulas.  When we generate a clause for a formula, like “A v B v -$or1”, we need to only suppress formula generation for the -$or1 term, not the entire clause.  This matters when A and B are formula vars (eg “$and1 v $and2 v -$or1”).
2015-01-21 11:56:21 -08:00
David Greenspan
5d48ec2487 Cleaner genTrue/genFalse
Also, remember that _.bind exists
2015-01-21 11:56:21 -08:00
David Greenspan
0721dfadd2 Generated variable names start with $
Not backtick, or nothing
2015-01-21 11:56:20 -08:00
David Greenspan
66d07d40af Formula generation works with NOT and OR.
We have polarity and clean NOTs.  Bad ass.
2015-01-21 11:56:20 -08:00
David Greenspan
fb43b29154 Work towards formula vars; improve tests 2015-01-21 11:56:20 -08:00
David Greenspan
6b2c9ef3d7 Start working towards smart use of Formulas 2015-01-21 11:56:20 -08:00
David Greenspan
6e28db2c97 Formulas have type and guid; test improvements 2015-01-21 11:56:20 -08:00
David Greenspan
2d660ab92a Give clauses a nicer string representation 2015-01-21 11:56:20 -08:00
David Greenspan
4f983b15a1 Finish Logic.or 2015-01-21 11:56:20 -08:00
David Greenspan
fae2ef8d4b The awesome logic-solver package begins
cherry-pick these commits onto a better branch later
2015-01-21 11:56:19 -08:00
Slava Kim
e2b78cfd0b Merge branch 'templateEventsMethods' into devel
Adds Template#onRendered, Template#onCreated and Template#onDestroyed methods
2015-01-21 11:02:09 -08:00
David Glasser
fb8a79ba0f some comments about imported package versions 2015-01-20 22:47:25 -08:00
ekatek
27f7daa7f8 Merge branch 'master' into devel 2015-01-20 18:03:40 -08:00
ekatek
3347604325 Merge branch 'release-1.0.3' 2015-01-20 17:59:53 -08:00
ekatek
1e062d9f82 update examples to 1.0.3.1 2015-01-20 17:57:11 -08:00
ekatek
4c41b886a4 update docs to 1.0.3.1 2015-01-20 17:53:12 -08:00
David Glasser
340f49062b Merge branch 'pr/3497' into devel
Fixes #3497.
2015-01-20 17:45:09 -08:00
David Glasser
0cf3dbd3a9 Clarify 2015-01-20 17:45:03 -08:00
Robert Lowe
b420c8d651 Update outdated README.md
ReactiveDict's have been able to migrate since: 624035fab8

See [session](https://github.com/meteor/meteor/blob/devel/packages/session/session.js) as an example.
2015-01-20 17:45:03 -08:00
David Glasser
92c6e452cd Merge branch 'pr/3492' into devel
Fixes #3492.
2015-01-20 17:37:41 -08:00
David Glasser
68608e6aec Minor tweaks to #3492. 2015-01-20 17:37:41 -08:00
Daniel Li
a5bdf481df Clarified load order in docs. Fixes #3431 2015-01-20 17:37:41 -08:00
Ekaterina Kuznetsova
92a6adf5af Merge pull request #3281 from meteor/console-comments
more, cleaner comments in Console.js
2015-01-20 16:00:55 -08:00
David Glasser
7c087f7b76 Clarify command-line docs are just an overview
Addresses #3474.
2015-01-20 16:00:27 -08:00
Justin Santa Barbara
18a3b1ee08 Add files import to tools/run-selenium.js 2015-01-20 18:54:45 -05:00
ekatek
38e0e344c4 prepare for 1.0.3.1
- increment the release number in banners.json
- increment version number for meteor-tool
- increment release number in the release configuration
release/METEOR@1.0.3.1
2015-01-20 13:50:34 -08:00
ekatek
afb0915e68 be slightly more efficient in checking if dir exists
Cache the result of the stat call, rather than repeating it.
Also, while at it, rename the function.
2015-01-20 13:37:18 -08:00
ekatek
73a2f50d7d error handling in mkdir_p
Summary:
According to its contract, mkdir -p returns true if the directory
exists (and creates it if needed) and false if the item exists and isn't
a directory (so we couldn't make one). Because directory creation can
be concurrent, we need to wrap the actual mkdir call in a try/catch to handle
this issue (rather than just checking once).

This issue was always here. Previously, the race was against other apps editing
the same directory (which didn't come up that often). As of 1.0.3, files.js is a lot
more yieldy and this becomes a race condition on Meteor itself.

Test Plan: self-test

Reviewers: glasser

Differential Revision: https://phabricator.meteor.io/D15
2015-01-20 13:23:45 -08:00
ekatek
c5bc843816 bring README.md files up to 1.0.3 compatibility
Fill in all packages without README.md files with a short
README.md mentioning that this is an internal Meteor package.

Break up the top paragraph of a couple of existing README.md
files to be proper long description.

There is more work to do here, involving line wrapping and the like.
2015-01-20 12:21:35 -08:00
Ben Newman
1aba3a8e7a Eliminate the need for getAppDir in tools/server/shell.js.
Summary:
Instead of expecting the child process to figure out where the
`.meteor/local` directory is, we now tell it explicitly via the
`METEOR_SHELL_DIR` environment variable.

Fixes #3437.

Test Plan:
Run `meteor shell` in a separate terminal and see that it still connects
to an app running from the same app directory.

Reviewers: glasser

Reviewed By: glasser

Differential Revision: https://phabricator.meteor.io/D11
2015-01-20 13:56:57 -05:00
ekatek
99124d881a increment package versions release/METEOR@1.0.3 2015-01-20 10:25:22 -08:00
ekatek
87a9c59c64 fix History.md and banners.json 2015-01-20 10:13:36 -08:00
ekatek
3a3ba62736 set the banner 2015-01-20 09:53:29 -08:00
ekatek
b5628f4b23 minor test fixes
This mostly fixes tests:
- removes the 'restarted' check from some tests. We don't need it in those cases
  (printing the other banner is enough). We can no longer rely on that executing
  after the code in the package (in fact it seems to execute before, and then
  get overwritten), and the test still tests what it is intended to (that the new
  package code executes).

- minor fixes to essentially syntax errors -- the skeleton now uses double quotes
  instead of single quotes, so a regex failed to work, for example. We changed a
  version number in one part of the test, but not another.

- fixes selftest.js, sort of, to actually print out what test we are testing. This
  is an unfortunate interaction of Console.js changes in 1.0.2 and a progress bar
  (that came later). The progress bar erases the message telling you what test is
  running when you use a standard terminal. That's awkward, fixed.
2015-01-16 16:50:51 -08:00
Slava Kim
9c4e227ae4 More edits to docs, according to Sashko's comments 2015-01-16 16:40:24 -08:00
Slava Kim
9e7c14ac81 Globally replace Template.rendered callbacks to Template.onRendered
In:

- examples
- some blaze tests
- packages

Change:

- rendered -> onRendered()
- created -> onCreated()
- destroyed -> onDestroyed()
2015-01-16 16:36:23 -08:00
Slava Kim
e2d071f31c Sashko's comments 2015-01-16 16:00:53 -08:00
Slava Kim
c361b8eeee Update documentation about Template#onCreated/onRendered/onDestroyed 2015-01-16 11:29:22 -08:00
Slava Kim
6aff197c47 Better comments.
In response to Sashko's comments.
2015-01-16 10:47:51 -08:00