Compare commits

...

70 Commits

Author SHA1 Message Date
Lucien Greathouse
300975f49c 0.4.13 2018-11-12 21:51:48 -08:00
Lucien Greathouse
325cf56457 Update CHANGES and test-project 2018-11-12 21:47:08 -08:00
Lucien Greathouse
71b1320aa8 Issue a warning instead of dying when a partition target does not exist 2018-11-12 21:45:28 -08:00
Lucien Greathouse
c5abc87dbd Increase polling interval to 300ms 2018-08-17 11:24:05 -07:00
Lucien Greathouse
bd7ab593d5 Release 0.4.12 2018-06-21 11:21:42 -07:00
Lucien Greathouse
c93da3f6b2 Update CHANGES 2018-06-21 11:19:22 -07:00
Lucien Greathouse
8b90e98696 Added a plugin action for the sync in command (#80) 2018-06-21 11:17:26 -07:00
Lucien Greathouse
bc40ec8a5a Update CHANGES 2018-06-21 11:11:03 -07:00
Lucien Greathouse
f19cbccdd5 Fix assertion failure when renaming files.
Fixes #78.
2018-06-21 11:10:28 -07:00
Lucien Greathouse
f25ae914e4 Add TODO about preserving partition roots in reconciliation 2018-06-20 18:23:24 -07:00
Lucien Greathouse
fb7bfa928a Release 0.4.11 2018-06-10 15:54:57 -07:00
Lucien Greathouse
100d69262c Update CHANGES 2018-06-10 15:52:42 -07:00
Lucien Greathouse
5e01658846 Remove straggling debug message 2018-06-10 15:50:30 -07:00
Lucien Greathouse
ccec93aee8 Untangle route terminology a bit 2018-06-10 15:50:03 -07:00
Lucien Greathouse
a089d82023 Fix incorrect route being assigned to init.lua and init.model.json files 2018-06-10 15:44:56 -07:00
Lucien Greathouse
82ba583fa0 Fix incorrect synchronization for Plugin:_pull that would make polling flaky 2018-06-10 15:13:49 -07:00
Lucien Greathouse
1b82044d7d Defensively insert existing instances into RouteMap 2018-06-10 15:03:36 -07:00
Lucien Greathouse
0d49a2e0af Mention VS Code extension in getting started guide 2018-06-02 01:04:31 -07:00
Lucien Greathouse
1343d3a2a9 Pick up rest of changes for 0.4.10, oops 2018-06-02 00:50:35 -07:00
Lucien Greathouse
a86001b85c Release 0.4.10 2018-06-01 23:51:35 -07:00
Lucien Greathouse
d6dd46c467 Fix JsonModelPlugin marking paths as changed correctly 2018-06-01 23:38:49 -07:00
Lucien Greathouse
320974074c Update docs 2018-06-01 23:33:36 -07:00
Lucien Greathouse
7b824abe52 Update CHANGES 2018-06-01 23:30:59 -07:00
Lucien Greathouse
bfd33f4b8d Support init.model.json
Closes #66.
2018-06-01 23:29:39 -07:00
Lucien Greathouse
d5a21a0513 Update plugin .luacheckrc to be more strict 2018-06-01 23:11:58 -07:00
Lucien Greathouse
c894b38f06 Improve plugin API robustness 2018-06-01 23:11:50 -07:00
Lucien Greathouse
a86347ea32 Add typechecks to reconciler and improve robustness a touch 2018-06-01 22:34:11 -07:00
Lucien Greathouse
b60bfc7495 Make nil checks more robust.
This represents an evolution in how I've been thinking about Lua -- using boolean coercion
is generally a bad idea I think because it obscures the underlying types.

It also makes it so that if a boolean is eronneously passed into a function, and it
happens to be a 'false' value, it will be coerced into the nil case instead of being
reported as an error, no matter how unintuitive the resulting error might be.
2018-06-01 22:21:59 -07:00
Lucien Greathouse
4b2f27b26d Fix error when targeting invalid services 2018-06-01 22:17:54 -07:00
Lucien Greathouse
f4d7dda8e3 Make docs on JSON model versioning more explicit 2018-05-26 17:19:37 -07:00
Lucien Greathouse
0d6e3e66ce Release 0.4.9 2018-05-26 17:02:04 -07:00
Lucien Greathouse
7e4d451765 Update Sync Details docs 2018-05-26 17:00:23 -07:00
Lucien Greathouse
804bbc93b7 Make JSON models less strict 2018-05-26 16:59:09 -07:00
Lucien Greathouse
e7fe4ac3ec Remove vestigial backwards syncing functionality.
This functionality won't be present until the refactor in 0.5.0
2018-05-26 16:44:25 -07:00
Lucien Greathouse
40c41b4400 Update Sync Details docs to mention how JSON models work.
Closes #71.
2018-05-26 16:41:38 -07:00
Lucien Greathouse
0936c7c97d Fix indentation in CHANGES 2018-05-26 16:23:13 -07:00
Lucien Greathouse
9ac537d38f Add entry to CHANGES 2018-05-26 16:23:09 -07:00
Lucien Greathouse
fcfd55ff76 Fix error in RouteMap
Closes #72.
2018-05-26 16:19:58 -07:00
Lucien Greathouse
c2495ed57f Release 0.4.8 (oops) 2018-05-25 23:42:31 -07:00
Lucien Greathouse
6ad763fc01 Fix flip-flopped arguments in RouteMap:_removeInternal 2018-05-25 23:40:34 -07:00
Lucien Greathouse
c856a3e361 Release 0.4.7 2018-05-25 23:31:01 -07:00
Lucien Greathouse
aa5f0cc335 Issue a warning if no partitions are specified during serve.
Closes #40
2018-05-22 11:04:53 -07:00
Lucien Greathouse
b067335bbf Update CHANGES 2018-05-22 10:55:23 -07:00
Jonathan Holmes
7d24a14004 Added plugin icons to Rojo (#70) 2018-05-22 10:52:55 -07:00
Lucien Greathouse
910be640e9 Release 0.4.6 2018-05-21 13:26:25 -07:00
Lucien Greathouse
3137753afa Update CHANGES 2018-05-21 13:09:00 -07:00
Lucien Greathouse
000ff351a5 Improve plugin handling with regards to restarts and UI
Closes #67.
2018-05-21 13:05:52 -07:00
Lucien Greathouse
533c8ddaf7 Update CHANGES 2018-05-21 12:55:41 -07:00
Lucien Greathouse
f777d1b6c6 Update CHANGES 2018-05-21 12:52:46 -07:00
Lucien Greathouse
8b17d3b7d9 Intense robustness pass 2018-05-21 12:48:25 -07:00
Lucien Greathouse
6fbe1daf8e Add folder for testing script duplication bug 2018-05-21 12:47:51 -07:00
Lucien Greathouse
3bd191414b Update CHANGES 2018-05-21 11:45:55 -07:00
Lucien Greathouse
fd2cb3495b Make reconciler more robust with regards to RouteMap 2018-05-21 11:21:31 -07:00
Lucien Greathouse
e9d33bdc02 Skip reparenting if parent is the same 2018-05-21 11:16:56 -07:00
Lucien Greathouse
c0f4b31ab3 Make sure all descendants get removed from the RouteMap 2018-05-21 10:40:06 -07:00
Lucien Greathouse
78de30dcf2 Fix missing colon in plugin stopped polling message 2018-05-01 14:36:25 -07:00
Lucien Greathouse
23c59dcae7 0.4.5 2018-05-01 12:29:48 -07:00
Lucien Greathouse
274ba5810b Update to Rouille 2.1 and latest dependencies 2018-04-22 17:35:21 -07:00
Lucien Greathouse
3661d0daec Show name of project when starting server 2018-04-22 17:19:21 -07:00
Lucien Greathouse
f215df891c Decrease debounce timeout, which will make polling much snappier 2018-04-22 16:43:32 -07:00
Lucien Greathouse
ce5fe00a66 Delete Promise.spec.lua 2018-04-21 01:16:19 -07:00
Lucien Greathouse
2d71e3ebea Switch to library version of Promise 2018-04-20 23:26:50 -07:00
Lucien Greathouse
187194a615 Keep track of actual file name in VfsItem.
This should fix the case of a partition pointed directly at a file
turning the object into a `StringValue`.

Fixes #57.
2018-04-20 23:13:43 -07:00
Lucien Greathouse
9e956e593d Expand test project to have a partition targeting a script directly 2018-04-20 23:13:01 -07:00
Lucien Greathouse
c2cfcc7a2c Prevent syncing while a sync is already in progress.
I'm fairly confident that there will be zero cases where the plugin gets
into a bad state where you can't sync.

This change also prefixes most of Rojo's messages with `Rojo:` to make
them easier to identify.

Fixes #61.
2018-04-20 22:29:58 -07:00
Lucien Greathouse
8c482f75dd Improve error messages for 'serve' command.
Rojo now throws an error if no project file could be found.

Fixes #63.
2018-04-20 21:45:48 -07:00
Lucien Greathouse
29a83cb626 Update LICENSE 2018-04-12 00:18:45 -07:00
Lucien Greathouse
a563e4c381 Update LICENSE 2018-04-12 00:13:09 -07:00
Lucien Greathouse
9cee587f22 Remove documentation from README and point to snazzy new documentation website 2018-04-08 00:16:21 -07:00
Lucien Greathouse
b5cc243466 Flesh out documentation, normalize markdown indentation 2018-04-08 00:09:28 -07:00
46 changed files with 1219 additions and 1105 deletions

View File

@@ -7,4 +7,9 @@ charset = utf-8
[*.json] [*.json]
indent_style = space indent_style = space
indent_size = 2 indent_size = 2
trim_trailing_whitespace = true
[*.md]
indent_style = space
indent_size = 4
trim_trailing_whitespace = true trim_trailing_whitespace = true

3
.gitmodules vendored
View File

@@ -13,3 +13,6 @@
[submodule "plugin/modules/lemur"] [submodule "plugin/modules/lemur"]
path = plugin/modules/lemur path = plugin/modules/lemur
url = https://github.com/LPGhatguy/lemur.git url = https://github.com/LPGhatguy/lemur.git
[submodule "plugin/modules/promise"]
path = plugin/modules/promise
url = https://github.com/LPGhatguy/roblox-lua-promise.git

View File

@@ -1,7 +1,52 @@
# Rojo Change Log # Rojo Change Log
## Current Master ## Current master
*No changes* * *No changes*
## 0.4.13 (November 12, 2018)
* When `rojo.json` points to a file or directory that does not exist, Rojo now issues a warning instead of throwing an error and exiting
## 0.4.12 (June 21, 2018)
* Fixed obscure assertion failure when renaming or deleting files ([#78](https://github.com/LPGhatguy/rojo/issues/78))
* Added a `PluginAction` for the sync in command, which should help with some automation scripts ([#80](https://github.com/LPGhatguy/rojo/pull/80))
## 0.4.11 (June 10, 2018)
* Defensively insert existing instances into RouteMap; should fix most duplication cases when syncing into existing trees.
* Fixed incorrect synchronization from `Plugin:_pull` that would cause polling to create issues
* Fixed incorrect file routes being assigned to `init.lua` and `init.model.json` files
* Untangled route handling-internals slightly
## 0.4.10 (June 2, 2018)
* Added support for `init.model.json` files, which enable versioning `Tool` instances (among other things) with Rojo. ([#66](https://github.com/LPGhatguy/rojo/issues/66))
* Fixed obscure error when syncing into an invalid service.
* Fixed multiple sync processes occurring when a server ID mismatch is detected.
## 0.4.9 (May 26, 2018)
* Fixed warning when renaming or removing files that would sometimes corrupt the instance cache ([#72](https://github.com/LPGhatguy/rojo/pull/72))
* JSON models are no longer as strict -- `Children` and `Properties` are now optional.
## 0.4.8 (May 26, 2018)
* Hotfix to prevent errors from being thrown when objects managed by Rojo are deleted
## 0.4.7 (May 25, 2018)
* Added icons to the Rojo plugin, made by [@Vorlias](https://github.com/Vorlias)! ([#70](https://github.com/LPGhatguy/rojo/pull/70))
* Server will now issue a warning if no partitions are specified in `rojo serve` ([#40](https://github.com/LPGhatguy/rojo/issues/40))
## 0.4.6 (May 21, 2018)
* Rojo handles being restarted by Roblox Studio more gracefully ([#67](https://github.com/LPGhatguy/rojo/issues/67))
* Folders should no longer get collapsed when syncing occurs.
* **Significant** robustness improvements with regards to caching.
* **This should catch all existing script duplication bugs.**
* If there are any bugs with script duplication or caching in the future, restarting the Rojo server process will fix them for that session.
* Fixed message in plugin not being prefixed with `Rojo: `.
## 0.4.5 (May 1, 2018)
* Rojo messages are now prefixed with `Rojo: ` to make them stand out in the output more.
* Fixed server to notice file changes *much* more quickly. (200ms vs 1000ms)
* Server now lists name of project when starting up.
* Rojo now throws an error if no project file is found. ([#63](https://github.com/LPGhatguy/rojo/issues/63))
* Fixed multiple sync operations occuring at the same time. ([#61](https://github.com/LPGhatguy/rojo/issues/61))
* Partitions targeting files directly now work as expected. ([#57](https://github.com/LPGhatguy/rojo/issues/57))
## 0.4.4 (April 7, 2018) ## 0.4.4 (April 7, 2018)
* Fix small regression introduced in 0.4.3 * Fix small regression introduced in 0.4.3
@@ -9,11 +54,11 @@
## 0.4.3 (April 7, 2018) ## 0.4.3 (April 7, 2018)
* Plugin now automatically selects `HttpService` if it determines that HTTP isn't enabled ([#58](https://github.com/LPGhatguy/rojo/pull/58)) * Plugin now automatically selects `HttpService` if it determines that HTTP isn't enabled ([#58](https://github.com/LPGhatguy/rojo/pull/58))
* Plugin now has much more robust handling and will wipe all state when the server changes. * Plugin now has much more robust handling and will wipe all state when the server changes.
* This should fix issues that would otherwise be solved by restarting Roblox Studio. * This should fix issues that would otherwise be solved by restarting Roblox Studio.
## 0.4.2 (April 4, 2018) ## 0.4.2 (April 4, 2018)
* Fixed final case of duplicated instance insertion, caused by reconciled instances not being inserted into `RouteMap`. * Fixed final case of duplicated instance insertion, caused by reconciled instances not being inserted into `RouteMap`.
* The reconciler is still not a perfect solution, especially if script instances get moved around without being destroyed. I don't think this can be fixed before a big refactor. * The reconciler is still not a perfect solution, especially if script instances get moved around without being destroyed. I don't think this can be fixed before a big refactor.
## 0.4.1 (April 1, 2018) ## 0.4.1 (April 1, 2018)
* Merged plugin repository into main Rojo repository for easier tracking. * Merged plugin repository into main Rojo repository for easier tracking.
@@ -21,9 +66,9 @@
## 0.4.0 (March 27, 2018) ## 0.4.0 (March 27, 2018)
* Protocol version 1, which shifts more responsibility onto the server * Protocol version 1, which shifts more responsibility onto the server
* This is a **major breaking** change! * This is a **major breaking** change!
* The server now has a content of 'filter plugins', which transform data at various stages in the pipeline * The server now has a content of 'filter plugins', which transform data at various stages in the pipeline
* The server now exposes Roblox instance objects instead of file contents, which lines up with how `rojo pack` will work, and paves the way for more robust syncing. * The server now exposes Roblox instance objects instead of file contents, which lines up with how `rojo pack` will work, and paves the way for more robust syncing.
* Added `*.model.json` files, which let you embed small Roblox objects into your Rojo tree. * Added `*.model.json` files, which let you embed small Roblox objects into your Rojo tree.
* Improved error messages in some cases ([#46](https://github.com/LPGhatguy/rojo/issues/46)) * Improved error messages in some cases ([#46](https://github.com/LPGhatguy/rojo/issues/46))
@@ -33,18 +78,18 @@
## 0.3.1 (December 14, 2017) ## 0.3.1 (December 14, 2017)
* Improved error reporting when invalid JSON is found in a `rojo.json` project * Improved error reporting when invalid JSON is found in a `rojo.json` project
* These messages are passed on from Serde * These messages are passed on from Serde
## 0.3.0 (December 12, 2017) ## 0.3.0 (December 12, 2017)
* Factored out the plugin into a separate repository * Factored out the plugin into a separate repository
* Fixed server when using a file as a partition * Fixed server when using a file as a partition
* Previously, trailing slashes were put on the end of a partition even if the read request was an empty string. This broke file reading on Windows when a partition pointed to a file instead of a directory! * Previously, trailing slashes were put on the end of a partition even if the read request was an empty string. This broke file reading on Windows when a partition pointed to a file instead of a directory!
* Started running automatic tests on Travis CI (#9) * Started running automatic tests on Travis CI (#9)
## 0.2.3 (December 4, 2017) ## 0.2.3 (December 4, 2017)
* Plugin only release * Plugin only release
* Tightened `init` file rules to only match script files * Tightened `init` file rules to only match script files
* Previously, Rojo would sometimes pick up the wrong file when syncing * Previously, Rojo would sometimes pick up the wrong file when syncing
## 0.2.2 (December 1, 2017) ## 0.2.2 (December 1, 2017)
* Plugin only release * Plugin only release

373
LICENSE Normal file
View File

@@ -0,0 +1,373 @@
Mozilla Public License Version 2.0
==================================
1. Definitions
--------------
1.1. "Contributor"
means each individual or legal entity that creates, contributes to
the creation of, or owns Covered Software.
1.2. "Contributor Version"
means the combination of the Contributions of others (if any) used
by a Contributor and that particular Contributor's Contribution.
1.3. "Contribution"
means Covered Software of a particular Contributor.
1.4. "Covered Software"
means Source Code Form to which the initial Contributor has attached
the notice in Exhibit A, the Executable Form of such Source Code
Form, and Modifications of such Source Code Form, in each case
including portions thereof.
1.5. "Incompatible With Secondary Licenses"
means
(a) that the initial Contributor has attached the notice described
in Exhibit B to the Covered Software; or
(b) that the Covered Software was made available under the terms of
version 1.1 or earlier of the License, but not also under the
terms of a Secondary License.
1.6. "Executable Form"
means any form of the work other than Source Code Form.
1.7. "Larger Work"
means a work that combines Covered Software with other material, in
a separate file or files, that is not Covered Software.
1.8. "License"
means this document.
1.9. "Licensable"
means having the right to grant, to the maximum extent possible,
whether at the time of the initial grant or subsequently, any and
all of the rights conveyed by this License.
1.10. "Modifications"
means any of the following:
(a) any file in Source Code Form that results from an addition to,
deletion from, or modification of the contents of Covered
Software; or
(b) any new file in Source Code Form that contains any Covered
Software.
1.11. "Patent Claims" of a Contributor
means any patent claim(s), including without limitation, method,
process, and apparatus claims, in any patent Licensable by such
Contributor that would be infringed, but for the grant of the
License, by the making, using, selling, offering for sale, having
made, import, or transfer of either its Contributions or its
Contributor Version.
1.12. "Secondary License"
means either the GNU General Public License, Version 2.0, the GNU
Lesser General Public License, Version 2.1, the GNU Affero General
Public License, Version 3.0, or any later versions of those
licenses.
1.13. "Source Code Form"
means the form of the work preferred for making modifications.
1.14. "You" (or "Your")
means an individual or a legal entity exercising rights under this
License. For legal entities, "You" includes any entity that
controls, is controlled by, or is under common control with You. For
purposes of this definition, "control" means (a) the power, direct
or indirect, to cause the direction or management of such entity,
whether by contract or otherwise, or (b) ownership of more than
fifty percent (50%) of the outstanding shares or beneficial
ownership of such entity.
2. License Grants and Conditions
--------------------------------
2.1. Grants
Each Contributor hereby grants You a world-wide, royalty-free,
non-exclusive license:
(a) under intellectual property rights (other than patent or trademark)
Licensable by such Contributor to use, reproduce, make available,
modify, display, perform, distribute, and otherwise exploit its
Contributions, either on an unmodified basis, with Modifications, or
as part of a Larger Work; and
(b) under Patent Claims of such Contributor to make, use, sell, offer
for sale, have made, import, and otherwise transfer either its
Contributions or its Contributor Version.
2.2. Effective Date
The licenses granted in Section 2.1 with respect to any Contribution
become effective for each Contribution on the date the Contributor first
distributes such Contribution.
2.3. Limitations on Grant Scope
The licenses granted in this Section 2 are the only rights granted under
this License. No additional rights or licenses will be implied from the
distribution or licensing of Covered Software under this License.
Notwithstanding Section 2.1(b) above, no patent license is granted by a
Contributor:
(a) for any code that a Contributor has removed from Covered Software;
or
(b) for infringements caused by: (i) Your and any other third party's
modifications of Covered Software, or (ii) the combination of its
Contributions with other software (except as part of its Contributor
Version); or
(c) under Patent Claims infringed by Covered Software in the absence of
its Contributions.
This License does not grant any rights in the trademarks, service marks,
or logos of any Contributor (except as may be necessary to comply with
the notice requirements in Section 3.4).
2.4. Subsequent Licenses
No Contributor makes additional grants as a result of Your choice to
distribute the Covered Software under a subsequent version of this
License (see Section 10.2) or under the terms of a Secondary License (if
permitted under the terms of Section 3.3).
2.5. Representation
Each Contributor represents that the Contributor believes its
Contributions are its original creation(s) or it has sufficient rights
to grant the rights to its Contributions conveyed by this License.
2.6. Fair Use
This License is not intended to limit any rights You have under
applicable copyright doctrines of fair use, fair dealing, or other
equivalents.
2.7. Conditions
Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
in Section 2.1.
3. Responsibilities
-------------------
3.1. Distribution of Source Form
All distribution of Covered Software in Source Code Form, including any
Modifications that You create or to which You contribute, must be under
the terms of this License. You must inform recipients that the Source
Code Form of the Covered Software is governed by the terms of this
License, and how they can obtain a copy of this License. You may not
attempt to alter or restrict the recipients' rights in the Source Code
Form.
3.2. Distribution of Executable Form
If You distribute Covered Software in Executable Form then:
(a) such Covered Software must also be made available in Source Code
Form, as described in Section 3.1, and You must inform recipients of
the Executable Form how they can obtain a copy of such Source Code
Form by reasonable means in a timely manner, at a charge no more
than the cost of distribution to the recipient; and
(b) You may distribute such Executable Form under the terms of this
License, or sublicense it under different terms, provided that the
license for the Executable Form does not attempt to limit or alter
the recipients' rights in the Source Code Form under this License.
3.3. Distribution of a Larger Work
You may create and distribute a Larger Work under terms of Your choice,
provided that You also comply with the requirements of this License for
the Covered Software. If the Larger Work is a combination of Covered
Software with a work governed by one or more Secondary Licenses, and the
Covered Software is not Incompatible With Secondary Licenses, this
License permits You to additionally distribute such Covered Software
under the terms of such Secondary License(s), so that the recipient of
the Larger Work may, at their option, further distribute the Covered
Software under the terms of either this License or such Secondary
License(s).
3.4. Notices
You may not remove or alter the substance of any license notices
(including copyright notices, patent notices, disclaimers of warranty,
or limitations of liability) contained within the Source Code Form of
the Covered Software, except that You may alter any license notices to
the extent required to remedy known factual inaccuracies.
3.5. Application of Additional Terms
You may choose to offer, and to charge a fee for, warranty, support,
indemnity or liability obligations to one or more recipients of Covered
Software. However, You may do so only on Your own behalf, and not on
behalf of any Contributor. You must make it absolutely clear that any
such warranty, support, indemnity, or liability obligation is offered by
You alone, and You hereby agree to indemnify every Contributor for any
liability incurred by such Contributor as a result of warranty, support,
indemnity or liability terms You offer. You may include additional
disclaimers of warranty and limitations of liability specific to any
jurisdiction.
4. Inability to Comply Due to Statute or Regulation
---------------------------------------------------
If it is impossible for You to comply with any of the terms of this
License with respect to some or all of the Covered Software due to
statute, judicial order, or regulation then You must: (a) comply with
the terms of this License to the maximum extent possible; and (b)
describe the limitations and the code they affect. Such description must
be placed in a text file included with all distributions of the Covered
Software under this License. Except to the extent prohibited by statute
or regulation, such description must be sufficiently detailed for a
recipient of ordinary skill to be able to understand it.
5. Termination
--------------
5.1. The rights granted under this License will terminate automatically
if You fail to comply with any of its terms. However, if You become
compliant, then the rights granted under this License from a particular
Contributor are reinstated (a) provisionally, unless and until such
Contributor explicitly and finally terminates Your grants, and (b) on an
ongoing basis, if such Contributor fails to notify You of the
non-compliance by some reasonable means prior to 60 days after You have
come back into compliance. Moreover, Your grants from a particular
Contributor are reinstated on an ongoing basis if such Contributor
notifies You of the non-compliance by some reasonable means, this is the
first time You have received notice of non-compliance with this License
from such Contributor, and You become compliant prior to 30 days after
Your receipt of the notice.
5.2. If You initiate litigation against any entity by asserting a patent
infringement claim (excluding declaratory judgment actions,
counter-claims, and cross-claims) alleging that a Contributor Version
directly or indirectly infringes any patent, then the rights granted to
You by any and all Contributors for the Covered Software under Section
2.1 of this License shall terminate.
5.3. In the event of termination under Sections 5.1 or 5.2 above, all
end user license agreements (excluding distributors and resellers) which
have been validly granted by You or Your distributors under this License
prior to termination shall survive termination.
************************************************************************
* *
* 6. Disclaimer of Warranty *
* ------------------------- *
* *
* Covered Software is provided under this License on an "as is" *
* basis, without warranty of any kind, either expressed, implied, or *
* statutory, including, without limitation, warranties that the *
* Covered Software is free of defects, merchantable, fit for a *
* particular purpose or non-infringing. The entire risk as to the *
* quality and performance of the Covered Software is with You. *
* Should any Covered Software prove defective in any respect, You *
* (not any Contributor) assume the cost of any necessary servicing, *
* repair, or correction. This disclaimer of warranty constitutes an *
* essential part of this License. No use of any Covered Software is *
* authorized under this License except under this disclaimer. *
* *
************************************************************************
************************************************************************
* *
* 7. Limitation of Liability *
* -------------------------- *
* *
* Under no circumstances and under no legal theory, whether tort *
* (including negligence), contract, or otherwise, shall any *
* Contributor, or anyone who distributes Covered Software as *
* permitted above, be liable to You for any direct, indirect, *
* special, incidental, or consequential damages of any character *
* including, without limitation, damages for lost profits, loss of *
* goodwill, work stoppage, computer failure or malfunction, or any *
* and all other commercial damages or losses, even if such party *
* shall have been informed of the possibility of such damages. This *
* limitation of liability shall not apply to liability for death or *
* personal injury resulting from such party's negligence to the *
* extent applicable law prohibits such limitation. Some *
* jurisdictions do not allow the exclusion or limitation of *
* incidental or consequential damages, so this exclusion and *
* limitation may not apply to You. *
* *
************************************************************************
8. Litigation
-------------
Any litigation relating to this License may be brought only in the
courts of a jurisdiction where the defendant maintains its principal
place of business and such litigation shall be governed by laws of that
jurisdiction, without reference to its conflict-of-law provisions.
Nothing in this Section shall prevent a party's ability to bring
cross-claims or counter-claims.
9. Miscellaneous
----------------
This License represents the complete agreement concerning the subject
matter hereof. If any provision of this License is held to be
unenforceable, such provision shall be reformed only to the extent
necessary to make it enforceable. Any law or regulation which provides
that the language of a contract shall be construed against the drafter
shall not be used to construe this License against a Contributor.
10. Versions of the License
---------------------------
10.1. New Versions
Mozilla Foundation is the license steward. Except as provided in Section
10.3, no one other than the license steward has the right to modify or
publish new versions of this License. Each version will be given a
distinguishing version number.
10.2. Effect of New Versions
You may distribute the Covered Software under the terms of the version
of the License under which You originally received the Covered Software,
or under the terms of any subsequent version published by the license
steward.
10.3. Modified Versions
If you create software not governed by this License, and you want to
create a new license for such software, you may create and use a
modified version of this License if you rename the license and remove
any references to the name of the license steward (except to note that
such modified license differs from this License).
10.4. Distributing Source Code Form that is Incompatible With Secondary
Licenses
If You choose to distribute Source Code Form that is Incompatible With
Secondary Licenses under the terms of this version of the License, the
notice described in Exhibit B of this License must be attached.
Exhibit A - Source Code Form License Notice
-------------------------------------------
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at https://mozilla.org/MPL/2.0/.
If it is not possible or desirable to put the notice in a particular
file, then You may include the notice in a location (such as a LICENSE
file in a relevant directory) where a recipient would be likely to look
for such a notice.
You may add additional accurate notices of copyright ownership.
Exhibit B - "Incompatible With Secondary Licenses" Notice
---------------------------------------------------------
This Source Code Form is "Incompatible With Secondary Licenses", as
defined by the Mozilla Public License, v. 2.0.

View File

@@ -1,9 +0,0 @@
The MIT License (MIT)
Copyright (c) 2018 Lucien Greathouse
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

168
README.md
View File

@@ -1,14 +1,17 @@
<div align="center"> <div align="center">
<img src="assets/rojo-logo.png" alt="Rojo" height="217" /> <img src="assets/rojo-logo.png" alt="Rojo" height="217" />
</div> </div>
<div>&nbsp;</div> <div>&nbsp;</div>
<div align="center"> <div align="center">
<a href="https://travis-ci.org/LPGhatguy/rojo"> <a href="https://travis-ci.org/LPGhatguy/rojo">
<img src="https://api.travis-ci.org/LPGhatguy/rojo.svg?branch=master" alt="Travis-CI Build Status" /> <img src="https://api.travis-ci.org/LPGhatguy/rojo.svg?branch=master" alt="Travis-CI Build Status" />
</a> </a>
<img src="https://img.shields.io/badge/latest_version-0.4.4-brightgreen.svg" alt="Current server version" /> <img src="https://img.shields.io/badge/latest_version-0.4.13-brightgreen.svg" alt="Current server version" />
<a href="https://lpghatguy.github.io/rojo">
<img src="https://img.shields.io/badge/documentation-website-brightgreen.svg" alt="Rojo Documentation" />
</a>
</div> </div>
<hr /> <hr />
@@ -29,157 +32,8 @@ Later this year, Rojo will be able to:
* Sync `rbxmx` models between the filesystem and Roblox Studio * Sync `rbxmx` models between the filesystem and Roblox Studio
* Package projects into `rbxmx` files from the command line * Package projects into `rbxmx` files from the command line
## Installation ## [Documentation Website](https://lpghatguy.github.io/rojo)
Rojo has two components: You can also view the documentation by browsing the [docs folder of the repository](https://github.com/LPGhatguy/rojo/tree/master/docs), but because it uses a number of Markdown extensions, it may not be very readable.
* The server, a binary written in Rust
* The plugin, a Roblox Studio plugin written in Lua
It's important that the plugin and server are compatible. The plugin will show errors in the Roblox Studio Output window if there is a version mismatch.
To install the server, either:
* If you have Rust installed, use `cargo install rojo`
* Or, download a pre-built Windows binary from [the GitHub releases page](https://github.com/LPGhatguy/rojo/releases)
To install the plugin, either:
* Install the plugin from the [Roblox plugin page](https://www.roblox.com/library/1211549683/Rojo).
* This gives you less control over what version you install -- you will always have the latest version.
* Or, download the latest release from [the GitHub releases section](https://github.com/LPGhatguy/rojo/releases) and install it into your Roblox plugins folder
* You can open this folder by clicking the "Plugins Folder" button from the Plugins toolbar in Roblox Studio
## Server Usage
For more help, use `rojo help`.
### New Project
Create a new folder, then use `rojo init` inside that folder to initialize an empty project:
```sh
mkdir my-new-project
cd my-new-project
rojo init
```
Rojo will create an empty project file named `rojo.json` in the directory.
The default project file is:
```json
{
"name": "my-new-project",
"servePort": 8000,
"partitions": {}
}
```
### Start Dev Server
To start the Rojo dev server, use:
```sh
rojo serve
```
The tool will tell you whether it found an existing project. You should then be able to connect and use the project from within Roblox Studio!
### Migrating an Existing Roblox Project
[Bi-directional script syncing](https://github.com/LPGhatguy/rojo/issues/5) is on the roadmap for Rojo this year, but isn't implemented.
In the mean-time, manually migrating scripts is probably the best route forward.
### Syncing into Roblox
In order to sync code into Roblox, you'll need to add one or more *partitions* to your configuration. A partition tells Rojo how to map directories on your filesystem to Roblox objects.
Each entry in the `partitions` map has a unique name, a filesystem path, and the full name of the Roblox object to sync into.
For example, if you want to map your `src` directory to an object named `My Cool Game` in `ReplicatedStorage`, you could use this configuration:
```json
{
"name": "rojo",
"servePort": 8000,
"partitions": {
"game": {
"path": "src",
"target": "ReplicatedStorage.My Cool Game"
}
}
}
```
The `path` parameter is relative to the project file.
The `target` parameter is a path to a Roblox object to link the partition to, starting at `game`. If any objects don't exist along the way, Rojo will try to create them.
**Any objects in a partition may be wiped away by Rojo after syncing! If this is not desired, use multiple, smaller partitions.**
Run `rojo serve` in the directory containing this project, then press the "Sync In" or "Toggle Polling" buttons in the Roblox Studio plugin to sync into your game.
### Sync Details
The structure of files and diectories on the filesystem are preserved when syncing into game.
Creation of Roblox instances follows a simple set of rules. The first rule that matches the file name is chosen:
| File Name | Instance Type | Notes |
| -------------- | -------------- | ----------------------------------------- |
| `*.server.lua` | `Script` | `Source` will contain the file's contents |
| `*.client.lua` | `LocalScript` | `Source` will contain the file's contents |
| `*.lua` | `ModuleScript` | `Source` will contain the file's contents |
| `*.model.json` | *Varies* | See the example below |
| `*` | `StringValue` | `Value` will contain the file's contents |
Any directories on the filesystem will turn into `Folder` objects.
Any directory containing one of these files will instead be a `ModuleScript`, `Script`, `LocalScript` containing the directory's contents:
* `init.lua`
* `init.server.lua`
* `init.client.lua`
For example, this file tree:
* my-game
* init.client.lua
* foo.lua
Will turn into these instances in Roblox:
* `my-game` (`LocalScript` with source from `my-game/init.client.lua`)
* `foo` (`ModuleScript` with source from `my-game/foo.lua`)
`*.model.json` files are a way to represent simple Roblox instances on the filesystem until `rbxmx` and `rbxlx` support is implemented in Rojo.
This feature is intended for small instances, like `RemoteEvent` or `*Value` objects.
JSON Model files are strict, with every property being required. They look like this:
```json
{
"Name": "hello",
"ClassName": "Model",
"Children": [
{
"Name": "Some Part",
"ClassName": "Part",
"Children": [],
"Properties": {}
},
{
"Name": "Some StringValue",
"ClassName": "StringValue",
"Children": [],
"Properties": {
"Value": {
"Type": "String",
"Value": "Hello, world!"
}
}
}
],
"Properties": {}
}
```
## Inspiration ## Inspiration
There are lots of other tools that sync scripts into Roblox or provide other tools for working with Roblox places. There are lots of other tools that sync scripts into Roblox or provide other tools for working with Roblox places.
@@ -203,4 +57,4 @@ Pull requests are welcome!
All pull requests are run against a test suite on Travis CI. That test suite should always pass! All pull requests are run against a test suite on Travis CI. That test suite should always pass!
## License ## License
Rojo is available under the terms of the MIT license. See [LICENSE.md](LICENSE.md) for details. Rojo is available under the terms of the Mozilla Public License, Version 2.0. See [LICENSE](LICENSE) for details.

Binary file not shown.

After

Width:  |  Height:  |  Size: 375 B

BIN
assets/rojo-sync-in.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 382 B

BIN
assets/rojo-test-icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 430 B

View File

@@ -0,0 +1,77 @@
# Creating a Project
To use Rojo, you'll need to create a new project file, which tells Rojo what your project is, and how to load it into Roblox Studio.
## New Project
Create a new folder, then run `rojo init` inside that folder to initialize an empty project.
```sh
mkdir my-new-project
cd my-new-project
rojo init
```
Rojo will create an empty project file named `rojo.json` in the directory.
The default configuration doesn't do anything. We need to tell Rojo where our code is on the filesystem, and where we want to put it in the Roblox tree.
To do that, open up `rojo.json` and add an entry to the `partitions` table:
```json
{
"name": "your-project-name-here",
"servePort": 8000,
"partitions": {
"src": {
"path": "src",
"target": "ReplicatedStorage.Project"
}
}
}
```
!!! warning
Make sure that the `src` directory exists in your project, or Rojo will throw an error!
!!! warning
Any objects contained in the `target` of a partition will be destroyed by Rojo if not found on the filesystem!
A Rojo project has one or more *partitions*. Partitions define how code should be transferred between the filesystem and Roblox by mapping directories and files to Roblox objects.
Each partition has:
* A name (the key in the `partitions` object), which is used for debugging
* `path`, the location on the filesystem relative to `rojo.json`
* `target`, the location in Roblox relative to `game`
## Syncing into Studio
Once you've added your partition to the project file, you can start the Rojo dev server by running a command in your project's directory:
```sh
rojo serve
```
If your project is in the right place, Rojo will let you know that it was found and start an HTTP server that the plugin can connect to.
In Roblox Studio, open the plugins tab and find Rojo's buttons.
![Location of Rojo's plugin buttons in Roblox Studio](/images/plugin-buttons.png)
{: align="center" }
Press **Test Connection** to verify that the plugin can communicate with the dev server. Watch the Output panel for the results.
!!! info
If you see an error message, return to the previous steps and make sure that the Rojo dev server is running.
![Rojo error in Roblox Studio Output](/images/connection-error.png)
{: align="center" }
After your connection was successful, press **Sync In** to move code from the filesystem into Studio, or use **Toggle Polling** to have Rojo automatically sync in changes as they happen.
## Importing an Existing Project
Rojo will eventually support importing an existing Roblox project onto the filesystem for use with Rojo.
Rojo doesn't currently support converting an existing project or syncing files from Roblox Studio onto the filesystem. In the mean time, you can manually copy your files into the structure that Rojo expects.
Up-to-date information will be available on [issue #5](https://github.com/LPGhatguy/rojo/issues/5) as this is worked on.

View File

@@ -0,0 +1,26 @@
# Installation
Rojo has two components:
* The server, a binary written in Rust
* The plugin, a Roblox Studio plugin written in Lua
It's important that the plugin and server are compatible. The plugin will show errors in the Roblox Studio Output window if there is a version mismatch.
## Installing the Server
To install the server, either:
* If you have Rust installed, use `cargo install rojo`
* Or, download a pre-built Windows binary from [the GitHub releases page](https://github.com/LPGhatguy/rojo/releases)
**The Rojo binary must be run from the command line, like Terminal on MacOS or `cmd.exe` on Windows. It's recommended that you put the Rojo binary on your `PATH` to make this easier.**
## Installing the Plugin
To install the plugin, either:
* Install the plugin from the [Roblox plugin page](https://www.roblox.com/library/1211549683/Rojo).
* This gives you less control over what version you install -- you will always have the latest version.
* Or, download the latest release from [the GitHub releases section](https://github.com/LPGhatguy/rojo/releases) and install it into your Roblox plugins folder
* You can open this folder by clicking the "Plugins Folder" button from the Plugins toolbar in Roblox Studio
## Visual Studio Code Extension
If you use Visual Studio Code on Windows, you can install [Evaera's unofficial Rojo extension](https://marketplace.visualstudio.com/items?itemName=evaera.vscode-rojo), which will install both halves of Rojo for you. It even has a nifty UI to add partitions and start/stop the Rojo server!

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

65
docs/sync-details.md Normal file
View File

@@ -0,0 +1,65 @@
# Sync Details
This page aims to describe how Rojo turns files on the filesystem into Roblox objects.
## Folders
Any directory on the filesystem will turn into a `Folder` instance in Roblox, unless that folder matches the name of a service or other existing instance. In those cases, that instance will be preserved.
## Scripts
Rojo can represent `ModuleScript`, `Script`, and `LocalScript` objects. The default script type is `ModuleScript`, since most scripts in well-structued Roblox projects will be modules.
| File Name | Instance Type |
| -------------- | -------------- |
| `*.server.lua` | `Script` |
| `*.client.lua` | `LocalScript` |
| `*.lua` | `ModuleScript` |
If a directory contains a file named `init.server.lua`, `init.client.lua`, or `init.lua`, that folder will be transformed into a `*Script` instance with the conents of the `init` file. This can be used to create scripts inside of scripts.
For example, this file tree:
* my-game
* init.client.lua
* foo.lua
Will turn into these instances in Roblox:
![Example of Roblox instances](/images/sync-example.png)
## Models
Rojo supports a JSON model format for representing simple models. It's designed for instance types like `BindableEvent` or `Value` objects, and is not suitable for larger models.
Rojo JSON models are stored in `.model.json` files.
Starting in Rojo version **0.4.10**, model files named `init.model.json` that are located in folders will replace that folder, much like Rojo's `init.lua` support. This can be useful to version instances like `Tool` that tend to contain several instances as well as one or more scripts.
!!! info
In the future, Rojo will support `.rbxmx` models. See [issue #7](https://github.com/LPGhatguy/rojo/issues/7) for more details and updates on this feature.
!!! warning
Prior to Rojo version **0.4.9**, the `Properties` and `Children` properties are required on all instances in JSON models!
JSON model files are fairly strict; any syntax errors will cause the model to fail to sync! They look like this:
`hello.model.json`
```json
{
"Name": "hello",
"ClassName": "Model",
"Children": [
{
"Name": "Some Part",
"ClassName": "Part"
},
{
"Name": "Some StringValue",
"ClassName": "StringValue",
"Properties": {
"Value": {
"Type": "String",
"Value": "Hello, world!"
}
}
}
]
}
```

21
docs/why-rojo.md Normal file
View File

@@ -0,0 +1,21 @@
# Why Rojo?
There are a number of existing plugins for Roblox that move code from the filesystem into Roblox.
Besides Rojo, there is:
* [Studio Bridge](https://github.com/vocksel/studio-bridge) by [Vocksel](https://github.com/vocksel)
* [RbxRefresh](https://github.com/osyrisrblx/RbxRefresh) by [Osyris](https://github.com/osyrisrblx)
* [RbxSync](https://github.com/evaera/RbxSync) by [evaera](https://github.com/evaera)
* [CodeSync](https://github.com/MemoryPenguin/CodeSync) and [rbx-exteditor](https://github.com/MemoryPenguin/rbx-exteditor) by [MemoryPenguin](https://github.com/MemoryPenguin)
* [rbxmk](https://github.com/anaminus/rbxmk) by [Anaminus](https://github.com/anaminus)
So why did I build Rojo?
Each of these tools solves what is essentially the same problem from a few different angles. The goal of Rojo is to take all of the lessons and ideas learned from these projects and build a tool that can solve the problem for good.
Additionally:
* I think that this tool needs to be built in a compiled language without a runtime, for easy distribution and good performance.
* I think that the conventions promoted by other sync plugins (`.module.lua` for modules, as well a single sync point) are sub-optimal.
* I think that I have a good enough understanding of the problem to build something robust.
* I think that Rojo should be able to do more than just sync code.

View File

@@ -11,8 +11,14 @@ theme:
pages: pages:
- Home: index.md - Home: index.md
- Why Rojo?: why-rojo.md
- Getting Started:
- Installation: getting-started/installation.md
- Creating a Project: getting-started/creating-a-project.md
- Sync Details: sync-details.md
markdown_extensions: markdown_extensions:
- attr_list
- admonition - admonition
- codehilite: - codehilite:
guess_lang: false guess_lang: false

View File

@@ -39,10 +39,6 @@ stds.testez = {
ignore = { ignore = {
"212", -- unused arguments "212", -- unused arguments
"421", -- shadowing local variable
"422", -- shadowing argument
"431", -- shadowing upvalue
"432", -- shadowing upvalue argument
} }
std = "lua51+roblox" std = "lua51+roblox"

View File

@@ -18,6 +18,10 @@
"path": "modules/roact-rodux/lib", "path": "modules/roact-rodux/lib",
"target": "ReplicatedStorage.Rojo.modules.RoactRodux" "target": "ReplicatedStorage.Rojo.modules.RoactRodux"
}, },
"modules/promise": {
"path": "modules/promise/lib",
"target": "ReplicatedStorage.Rojo.modules.Promise"
},
"modules/testez": { "modules/testez": {
"path": "modules/testez/lib", "path": "modules/testez/lib",
"target": "ReplicatedStorage.TestEZ" "target": "ReplicatedStorage.TestEZ"

View File

@@ -1,7 +1,8 @@
local HttpService = game:GetService("HttpService") local HttpService = game:GetService("HttpService")
local Promise = require(script.Parent.Parent.modules.Promise)
local Config = require(script.Parent.Config) local Config = require(script.Parent.Config)
local Promise = require(script.Parent.Promise)
local Version = require(script.Parent.Version) local Version = require(script.Parent.Version)
local Api = {} local Api = {}
@@ -34,6 +35,9 @@ function Api.connect(http)
setmetatable(context, Api) setmetatable(context, Api)
return context:_start() return context:_start()
:andThen(function()
return context
end)
end end
function Api:_start() function Api:_start()
@@ -59,8 +63,6 @@ function Api:_start()
self.serverId = response.serverId self.serverId = response.serverId
self.currentTime = response.currentTime self.currentTime = response.currentTime
return self
end) end)
end end

View File

@@ -1,7 +1,12 @@
return { return {
pollingRate = 0.2, pollingRate = 0.3,
version = {0, 4, 4}, version = {0, 4, 13},
expectedServerVersionString = "0.4.x", expectedServerVersionString = "0.4.x",
protocolVersion = 1, protocolVersion = 1,
icons = {
syncIn = "rbxassetid://1820320573",
togglePolling = "rbxassetid://1820320064",
testConnection = "rbxassetid://1820320989",
},
dev = false, dev = false,
} }

View File

@@ -2,7 +2,8 @@ local HttpService = game:GetService("HttpService")
local HTTP_DEBUG = false local HTTP_DEBUG = false
local Promise = require(script.Parent.Promise) local Promise = require(script.Parent.Parent.modules.Promise)
local HttpError = require(script.Parent.HttpError) local HttpError = require(script.Parent.HttpError)
local HttpResponse = require(script.Parent.HttpResponse) local HttpResponse = require(script.Parent.HttpResponse)

View File

@@ -45,7 +45,7 @@ local function main()
local toolbar = plugin:CreateToolbar("Rojo Plugin " .. displayedVersion) local toolbar = plugin:CreateToolbar("Rojo Plugin " .. displayedVersion)
toolbar:CreateButton("Test Connection", "Connect to Rojo Server", "") toolbar:CreateButton("Test Connection", "Connect to Rojo Server", Config.icons.testConnection)
.Click:Connect(function() .Click:Connect(function()
checkUpgrade() checkUpgrade()
@@ -55,17 +55,22 @@ local function main()
end) end)
end) end)
toolbar:CreateButton("Sync In", "Sync into Roblox Studio", "") local function syncIn()
.Click:Connect(function() checkUpgrade()
checkUpgrade()
pluginInstance:syncIn() pluginInstance:syncIn()
:catch(function(err) :catch(function(err)
warn(err) warn(err)
end) end)
end) end
toolbar:CreateButton("Toggle Polling", "Poll server for changes", "") local shortDescription = "Sync In"
local longDescription = "Sync into Roblox Studio"
toolbar:CreateButton(shortDescription, longDescription, Config.icons.syncIn).Click:Connect(syncIn)
plugin:CreatePluginAction("RojoSyncIn", shortDescription, longDescription).Triggered:Connect(syncIn)
toolbar:CreateButton("Toggle Polling", "Poll server for changes", Config.icons.togglePolling)
.Click:Connect(function() .Click:Connect(function()
checkUpgrade() checkUpgrade()

View File

@@ -1,8 +1,15 @@
local CoreGui = game:GetService("CoreGui")
local Promise = require(script.Parent.Parent.modules.Promise)
local Config = require(script.Parent.Config) local Config = require(script.Parent.Config)
local Http = require(script.Parent.Http) local Http = require(script.Parent.Http)
local Api = require(script.Parent.Api) local Api = require(script.Parent.Api)
local Promise = require(script.Parent.Promise)
local Reconciler = require(script.Parent.Reconciler) local Reconciler = require(script.Parent.Reconciler)
local Version = require(script.Parent.Version)
local MESSAGE_SERVER_CHANGED = "Rojo: The server has changed since the last request, reloading plugin..."
local MESSAGE_PLUGIN_CHANGED = "Rojo: Another instance of Rojo came online, unloading..."
local function collectMatch(source, pattern) local function collectMatch(source, pattern)
local result = {} local result = {}
@@ -28,14 +35,29 @@ function Plugin.new()
_reconciler = Reconciler.new(), _reconciler = Reconciler.new(),
_api = nil, _api = nil,
_polling = false, _polling = false,
_syncInProgress = false,
} }
setmetatable(self, Plugin) setmetatable(self, Plugin)
do do
local uiName = ("Rojo %s UI"):format(Version.display(Config.version))
if Config.dev then
uiName = "Rojo Dev UI"
end
-- If there's an existing Rojo UI, like from a Roblox plugin upgrade
-- that wasn't Rojo, make sure we clean it up.
local existingUi = CoreGui:FindFirstChild(uiName)
if existingUi ~= nil then
existingUi:Destroy()
end
local screenGui = Instance.new("ScreenGui") local screenGui = Instance.new("ScreenGui")
screenGui.Name = "Rojo UI" screenGui.Name = uiName
screenGui.Parent = game.CoreGui screenGui.Parent = CoreGui
screenGui.DisplayOrder = -1 screenGui.DisplayOrder = -1
screenGui.Enabled = false screenGui.Enabled = false
@@ -52,6 +74,19 @@ function Plugin.new()
label.Parent = screenGui label.Parent = screenGui
self._label = screenGui self._label = screenGui
-- If our UI was destroyed, we assume it was from another instance of
-- the Rojo plugin coming online.
--
-- Roblox doesn't notify plugins when they get unloaded, so this is the
-- best trigger we have right now unless we create a dedicated event
-- object.
screenGui.AncestryChanged:Connect(function(_, parent)
if parent == nil then
warn(MESSAGE_PLUGIN_CHANGED)
self:restart()
end
end)
end end
return self return self
@@ -62,29 +97,35 @@ end
restarted. restarted.
]] ]]
function Plugin:restart() function Plugin:restart()
warn("The server has changed since the last request, reloading plugin...") self:stopPolling()
self._reconciler:destruct()
self._reconciler = Reconciler.new()
self._reconciler:clear()
self._api = nil self._api = nil
self._polling = false self._polling = false
self._syncInProgress = false
end end
function Plugin:api() function Plugin:getApi()
if not self._api then if self._api == nil then
self._api = Api.connect(self._http) return Api.connect(self._http)
:catch(function(err) :andThen(function(api)
self._api = nil self._api = api
return api
end, function(err)
return Promise.reject(err) return Promise.reject(err)
end) end)
end end
return self._api return Promise.resolve(self._api)
end end
function Plugin:connect() function Plugin:connect()
print("Testing connection...") print("Rojo: Testing connection...")
return self:api() return self:getApi()
:andThen(function(api) :andThen(function(api)
local ok, info = api:getInfo():await() local ok, info = api:getInfo():await()
@@ -92,12 +133,13 @@ function Plugin:connect()
return Promise.reject(info) return Promise.reject(info)
end end
print("Server found!") print("Rojo: Server found!")
print("Protocol version:", info.protocolVersion) print("Rojo: Protocol version:", info.protocolVersion)
print("Server version:", info.serverVersion) print("Rojo: Server version:", info.serverVersion)
end) end)
:catch(function(err) :catch(function(err)
if err == Api.Error.ServerIdMismatch then if err == Api.Error.ServerIdMismatch then
warn(MESSAGE_SERVER_CHANGED)
self:restart() self:restart()
return self:connect() return self:connect()
else else
@@ -119,7 +161,7 @@ function Plugin:stopPolling()
return Promise.resolve(false) return Promise.resolve(false)
end end
print("Stopped polling.") print("Rojo: Stopped polling server for changes.")
self._polling = false self._polling = false
self._label.Enabled = false self._label.Enabled = false
@@ -127,38 +169,34 @@ function Plugin:stopPolling()
return Promise.resolve(true) return Promise.resolve(true)
end end
function Plugin:_pull(api, project, routes) function Plugin:_pull(api, project, fileRoutes)
return api:read(routes) return api:read(fileRoutes)
:andThen(function(items) :andThen(function(items)
for index = 1, #routes do for index = 1, #fileRoutes do
local itemRoute = routes[index] local fileRoute = fileRoutes[index]
local partitionName = itemRoute[1] local partitionName = fileRoute[1]
local partition = project.partitions[partitionName] local partition = project.partitions[partitionName]
local item = items[index] local item = items[index]
local partitionRoute = collectMatch(partition.target, "[^.]+") local partitionTargetRbxRoute = collectMatch(partition.target, "[^.]+")
-- If the item route's length was 1, we need to rename the instance to -- If the item route's length was 1, we need to rename the instance to
-- line up with the partition's root object name. -- line up with the partition's root object name.
-- if item ~= nil and #fileRoute == 1 then
-- This is a HACK! local objectName = partition.target:match("[^.]+$")
if #itemRoute == 1 then item.Name = objectName
if item then
local objectName = partition.target:match("[^.]+$")
item.Name = objectName
end
end end
local fullRoute = {} local itemRbxRoute = {}
for _, piece in ipairs(partitionRoute) do for _, piece in ipairs(partitionTargetRbxRoute) do
table.insert(fullRoute, piece) table.insert(itemRbxRoute, piece)
end end
for i = 2, #itemRoute do for i = 2, #fileRoute do
table.insert(fullRoute, itemRoute[i]) table.insert(itemRbxRoute, fileRoute[i])
end end
self._reconciler:reconcileRoute(fullRoute, item, itemRoute) self._reconciler:reconcileRoute(itemRbxRoute, item, fileRoute)
end end
end) end)
end end
@@ -168,25 +206,25 @@ function Plugin:startPolling()
return return
end end
print("Starting to poll...") print("Rojo: Starting to poll server for changes...")
self._polling = true self._polling = true
self._label.Enabled = true self._label.Enabled = true
return self:api() return self:getApi()
:andThen(function(api) :andThen(function(api)
local syncOk, result = self:syncIn():await()
if not syncOk then
return Promise.reject(result)
end
local infoOk, info = api:getInfo():await() local infoOk, info = api:getInfo():await()
if not infoOk then if not infoOk then
return Promise.reject(info) return Promise.reject(info)
end end
local syncOk, result = self:syncIn():await()
if not syncOk then
return Promise.reject(result)
end
while self._polling do while self._polling do
local changesOk, changes = api:getChanges():await() local changesOk, changes = api:getChanges():await()
@@ -212,21 +250,28 @@ function Plugin:startPolling()
end end
end) end)
:catch(function(err) :catch(function(err)
self:stopPolling()
if err == Api.Error.ServerIdMismatch then if err == Api.Error.ServerIdMismatch then
warn(MESSAGE_SERVER_CHANGED)
self:restart() self:restart()
return self:startPolling() return self:startPolling()
else else
self:stopPolling()
return Promise.reject(err) return Promise.reject(err)
end end
end) end)
end end
function Plugin:syncIn() function Plugin:syncIn()
print("Syncing from server...") if self._syncInProgress then
warn("Rojo: Can't sync right now, because a sync is already in progress.")
return self:api() return Promise.resolve()
end
self._syncInProgress = true
print("Rojo: Syncing from server...")
return self:getApi()
:andThen(function(api) :andThen(function(api)
local ok, info = api:getInfo():await() local ok, info = api:getInfo():await()
@@ -234,18 +279,27 @@ function Plugin:syncIn()
return Promise.reject(info) return Promise.reject(info)
end end
local routes = {} local fileRoutes = {}
for name in pairs(info.project.partitions) do for name in pairs(info.project.partitions) do
table.insert(routes, {name}) table.insert(fileRoutes, {name})
end end
self:_pull(api, info.project, routes) local pullSuccess, pullResult = self:_pull(api, info.project, fileRoutes):await()
print("Sync successful!") self._syncInProgress = false
if not pullSuccess then
return Promise.reject(pullResult)
end
print("Rojo: Sync successful!")
end) end)
:catch(function(err) :catch(function(err)
self._syncInProgress = false
if err == Api.Error.ServerIdMismatch then if err == Api.Error.ServerIdMismatch then
warn(MESSAGE_SERVER_CHANGED)
self:restart() self:restart()
return self:syncIn() return self:syncIn()
else else

View File

@@ -1,307 +0,0 @@
--[[
An implementation of Promises similar to Promise/A+.
]]
local PROMISE_DEBUG = false
-- If promise debugging is on, use a version of pcall that warns on failure.
-- This is useful for finding errors that happen within Promise itself.
local wpcall
if PROMISE_DEBUG then
wpcall = function(f, ...)
local result = { pcall(f, ...) }
if not result[1] then
warn(result[2])
end
return unpack(result)
end
else
wpcall = pcall
end
--[[
Creates a function that invokes a callback with correct error handling and
resolution mechanisms.
]]
local function createAdvancer(callback, resolve, reject)
return function(...)
local result = { wpcall(callback, ...) }
local ok = table.remove(result, 1)
if ok then
resolve(unpack(result))
else
reject(unpack(result))
end
end
end
local function isEmpty(t)
return next(t) == nil
end
local Promise = {}
Promise.__index = Promise
Promise.Status = {
Started = "Started",
Resolved = "Resolved",
Rejected = "Rejected",
}
--[[
Constructs a new Promise with the given initializing callback.
This is generally only called when directly wrapping a non-promise API into
a promise-based version.
The callback will receive 'resolve' and 'reject' methods, used to start
invoking the promise chain.
For example:
local function get(url)
return Promise.new(function(resolve, reject)
spawn(function()
resolve(HttpService:GetAsync(url))
end)
end)
end
get("https://google.com")
:andThen(function(stuff)
print("Got some stuff!", stuff)
end)
]]
function Promise.new(callback)
local promise = {
-- Used to locate where a promise was created
_source = debug.traceback(),
-- A tag to identify us as a promise
_type = "Promise",
_status = Promise.Status.Started,
-- A table containing a list of all results, whether success or failure.
-- Only valid if _status is set to something besides Started
_value = nil,
-- If an error occurs with no observers, this will be set.
_unhandledRejection = false,
-- Queues representing functions we should invoke when we update!
_queuedResolve = {},
_queuedReject = {},
}
setmetatable(promise, Promise)
local function resolve(...)
promise:_resolve(...)
end
local function reject(...)
promise:_reject(...)
end
local ok, err = wpcall(callback, resolve, reject)
if not ok and promise._status == Promise.Status.Started then
reject(err)
end
return promise
end
--[[
Create a promise that represents the immediately resolved value.
]]
function Promise.resolve(value)
return Promise.new(function(resolve)
resolve(value)
end)
end
--[[
Create a promise that represents the immediately rejected value.
]]
function Promise.reject(value)
return Promise.new(function(_, reject)
reject(value)
end)
end
--[[
Returns a new promise that:
* is resolved when all input promises resolve
* is rejected if ANY input promises reject
]]
function Promise.all(...)
error("unimplemented", 2)
end
--[[
Is the given object a Promise instance?
]]
function Promise.is(object)
if type(object) ~= "table" then
return false
end
return object._type == "Promise"
end
--[[
Creates a new promise that receives the result of this promise.
The given callbacks are invoked depending on that result.
]]
function Promise:andThen(successHandler, failureHandler)
self._unhandledRejection = false
-- Create a new promise to follow this part of the chain
return Promise.new(function(resolve, reject)
-- Our default callbacks just pass values onto the next promise.
-- This lets success and failure cascade correctly!
local successCallback = resolve
if successHandler then
successCallback = createAdvancer(successHandler, resolve, reject)
end
local failureCallback = reject
if failureHandler then
failureCallback = createAdvancer(failureHandler, resolve, reject)
end
if self._status == Promise.Status.Started then
-- If we haven't resolved yet, put ourselves into the queue
table.insert(self._queuedResolve, successCallback)
table.insert(self._queuedReject, failureCallback)
elseif self._status == Promise.Status.Resolved then
-- This promise has already resolved! Trigger success immediately.
successCallback(unpack(self._value))
elseif self._status == Promise.Status.Rejected then
-- This promise died a terrible death! Trigger failure immediately.
failureCallback(unpack(self._value))
end
end)
end
--[[
Used to catch any errors that may have occurred in the promise.
]]
function Promise:catch(failureCallback)
return self:andThen(nil, failureCallback)
end
--[[
Yield until the promise is completed.
This matches the execution model of normal Roblox functions.
]]
function Promise:await()
self._unhandledRejection = false
if self._status == Promise.Status.Started then
local result
local bindable = Instance.new("BindableEvent")
self:andThen(function(...)
result = {...}
bindable:Fire(true)
end, function(...)
result = {...}
bindable:Fire(false)
end)
local ok = bindable.Event:Wait()
bindable:Destroy()
return ok, unpack(result)
elseif self._status == Promise.Status.Resolved then
return true, unpack(self._value)
elseif self._status == Promise.Status.Rejected then
return false, unpack(self._value)
end
end
function Promise:_resolve(...)
if self._status ~= Promise.Status.Started then
return
end
-- If the resolved value was a Promise, we chain onto it!
if Promise.is((...)) then
-- Without this warning, arguments sometimes mysteriously disappear
if select("#", ...) > 1 then
local message = (
"When returning a Promise from andThen, extra arguments are " ..
"discarded! See:\n\n%s"
):format(
self._source
)
warn(message)
end
(...):andThen(function(...)
self:_resolve(...)
end, function(...)
self:_reject(...)
end)
return
end
self._status = Promise.Status.Resolved
self._value = {...}
-- We assume that these callbacks will not throw errors.
for _, callback in ipairs(self._queuedResolve) do
callback(...)
end
end
function Promise:_reject(...)
if self._status ~= Promise.Status.Started then
return
end
self._status = Promise.Status.Rejected
self._value = {...}
-- If there are any rejection handlers, call those!
if not isEmpty(self._queuedReject) then
-- We assume that these callbacks will not throw errors.
for _, callback in ipairs(self._queuedReject) do
callback(...)
end
else
-- At this point, no one was able to observe the error.
-- An error handler might still be attached if the error occurred
-- synchronously. We'll wait one tick, and if there are still no
-- observers, then we should put a message in the console.
self._unhandledRejection = true
local err = tostring((...))
spawn(function()
-- Someone observed the error, hooray!
if not self._unhandledRejection then
return
end
-- Build a reasonable message
local message = ("Unhandled promise rejection:\n\n%s\n\n%s"):format(
err,
self._source
)
warn(message)
end)
end
end
return Promise

View File

@@ -1,262 +0,0 @@
return function()
local Promise = require(script.Parent.Promise)
describe("Promise.new", function()
it("should instantiate with a callback", function()
local promise = Promise.new(function() end)
expect(promise).to.be.ok()
end)
it("should invoke the given callback with resolve and reject", function()
local callCount = 0
local resolveArg
local rejectArg
local promise = Promise.new(function(resolve, reject)
callCount = callCount + 1
resolveArg = resolve
rejectArg = reject
end)
expect(promise).to.be.ok()
expect(callCount).to.equal(1)
expect(resolveArg).to.be.a("function")
expect(rejectArg).to.be.a("function")
expect(promise._status).to.equal(Promise.Status.Started)
end)
it("should resolve promises on resolve()", function()
local callCount = 0
local promise = Promise.new(function(resolve)
callCount = callCount + 1
resolve()
end)
expect(promise).to.be.ok()
expect(callCount).to.equal(1)
expect(promise._status).to.equal(Promise.Status.Resolved)
end)
it("should reject promises on reject()", function()
local callCount = 0
local promise = Promise.new(function(resolve, reject)
callCount = callCount + 1
reject()
end)
expect(promise).to.be.ok()
expect(callCount).to.equal(1)
expect(promise._status).to.equal(Promise.Status.Rejected)
end)
it("should reject on error in callback", function()
local callCount = 0
local promise = Promise.new(function()
callCount = callCount + 1
error("hahah")
end)
expect(promise).to.be.ok()
expect(callCount).to.equal(1)
expect(promise._status).to.equal(Promise.Status.Rejected)
expect(promise._value[1]:find("hahah")).to.be.ok()
end)
end)
describe("Promise.resolve", function()
it("should immediately resolve with a value", function()
local promise = Promise.resolve(5)
expect(promise).to.be.ok()
expect(promise._status).to.equal(Promise.Status.Resolved)
expect(promise._value[1]).to.equal(5)
end)
it("should chain onto passed promises", function()
local promise = Promise.resolve(Promise.new(function(_, reject)
reject(7)
end))
expect(promise).to.be.ok()
expect(promise._status).to.equal(Promise.Status.Rejected)
expect(promise._value[1]).to.equal(7)
end)
end)
describe("Promise.reject", function()
it("should immediately reject with a value", function()
local promise = Promise.reject(6)
expect(promise).to.be.ok()
expect(promise._status).to.equal(Promise.Status.Rejected)
expect(promise._value[1]).to.equal(6)
end)
it("should pass a promise as-is as an error", function()
local innerPromise = Promise.new(function(resolve)
resolve(6)
end)
local promise = Promise.reject(innerPromise)
expect(promise).to.be.ok()
expect(promise._status).to.equal(Promise.Status.Rejected)
expect(promise._value[1]).to.equal(innerPromise)
end)
end)
describe("Promise:andThen", function()
it("should chain onto resolved promises", function()
local args
local argsLength
local callCount = 0
local badCallCount = 0
local promise = Promise.resolve(5)
local chained = promise
:andThen(function(...)
args = {...}
argsLength = select("#", ...)
callCount = callCount + 1
end, function()
badCallCount = badCallCount + 1
end)
expect(badCallCount).to.equal(0)
expect(callCount).to.equal(1)
expect(argsLength).to.equal(1)
expect(args[1]).to.equal(5)
expect(promise).to.be.ok()
expect(promise._status).to.equal(Promise.Status.Resolved)
expect(promise._value[1]).to.equal(5)
expect(chained).to.be.ok()
expect(chained).never.to.equal(promise)
expect(chained._status).to.equal(Promise.Status.Resolved)
expect(#chained._value).to.equal(0)
end)
it("should chain onto rejected promises", function()
local args
local argsLength
local callCount = 0
local badCallCount = 0
local promise = Promise.reject(5)
local chained = promise
:andThen(function(...)
badCallCount = badCallCount + 1
end, function(...)
args = {...}
argsLength = select("#", ...)
callCount = callCount + 1
end)
expect(badCallCount).to.equal(0)
expect(callCount).to.equal(1)
expect(argsLength).to.equal(1)
expect(args[1]).to.equal(5)
expect(promise).to.be.ok()
expect(promise._status).to.equal(Promise.Status.Rejected)
expect(promise._value[1]).to.equal(5)
expect(chained).to.be.ok()
expect(chained).never.to.equal(promise)
expect(chained._status).to.equal(Promise.Status.Resolved)
expect(#chained._value).to.equal(0)
end)
it("should chain onto asynchronously resolved promises", function()
local args
local argsLength
local callCount = 0
local badCallCount = 0
local startResolution
local promise = Promise.new(function(resolve)
startResolution = resolve
end)
local chained = promise
:andThen(function(...)
args = {...}
argsLength = select("#", ...)
callCount = callCount + 1
end, function()
badCallCount = badCallCount + 1
end)
expect(callCount).to.equal(0)
expect(badCallCount).to.equal(0)
startResolution(6)
expect(badCallCount).to.equal(0)
expect(callCount).to.equal(1)
expect(argsLength).to.equal(1)
expect(args[1]).to.equal(6)
expect(promise).to.be.ok()
expect(promise._status).to.equal(Promise.Status.Resolved)
expect(promise._value[1]).to.equal(6)
expect(chained).to.be.ok()
expect(chained).never.to.equal(promise)
expect(chained._status).to.equal(Promise.Status.Resolved)
expect(#chained._value).to.equal(0)
end)
it("should chain onto asynchronously rejected promises", function()
local args
local argsLength
local callCount = 0
local badCallCount = 0
local startResolution
local promise = Promise.new(function(_, reject)
startResolution = reject
end)
local chained = promise
:andThen(function()
badCallCount = badCallCount + 1
end, function(...)
args = {...}
argsLength = select("#", ...)
callCount = callCount + 1
end)
expect(callCount).to.equal(0)
expect(badCallCount).to.equal(0)
startResolution(6)
expect(badCallCount).to.equal(0)
expect(callCount).to.equal(1)
expect(argsLength).to.equal(1)
expect(args[1]).to.equal(6)
expect(promise).to.be.ok()
expect(promise._status).to.equal(Promise.Status.Rejected)
expect(promise._value[1]).to.equal(6)
expect(chained).to.be.ok()
expect(chained).never.to.equal(promise)
expect(chained._status).to.equal(Promise.Status.Resolved)
expect(#chained._value).to.equal(0)
end)
end)
end

View File

@@ -1,24 +1,48 @@
local RouteMap = require(script.Parent.RouteMap) local RouteMap = require(script.Parent.RouteMap)
local function classEqual(rbx, className) local function classEqual(a, b)
if className == "*" then assert(typeof(a) == "string")
assert(typeof(b) == "string")
if a == "*" or b == "*" then
return true return true
end end
return rbx.ClassName == className return a == b
end end
local function reparent(rbx, parent) local function applyProperties(target, properties)
if rbx then assert(typeof(target) == "Instance")
-- It's possible that 'rbx' is a service or some other object that we assert(typeof(properties) == "table")
-- can't change the parent of. That's the only reason why Parent would
-- fail except for rbx being previously destroyed! for key, property in pairs(properties) do
pcall(function() -- TODO: Transform property value based on property.Type
rbx.Parent = parent -- Right now, we assume that 'value' is primitive!
end) target[key] = property.Value
end end
end end
--[[
Attempt to parent `rbx` to `parent`, doing nothing if:
* parent is already `parent`
* Changing parent threw an error
]]
local function reparent(rbx, parent)
assert(typeof(rbx) == "Instance")
assert(typeof(parent) == "Instance")
if rbx.Parent == parent then
return
end
-- Setting `Parent` can fail if:
-- * The object has been destroyed
-- * The object is a service and cannot be reparented
pcall(function()
rbx.Parent = parent
end)
end
--[[ --[[
Attempts to match up Roblox instances and object specifiers for Attempts to match up Roblox instances and object specifiers for
reconciliation. reconciliation.
@@ -38,7 +62,7 @@ local function findNextChildPair(primaryChildren, secondaryChildren, visited)
visited[primaryChild] = true visited[primaryChild] = true
for _, secondaryChild in ipairs(secondaryChildren) do for _, secondaryChild in ipairs(secondaryChildren) do
if primaryChild.ClassName == secondaryChild.ClassName and primaryChild.Name == secondaryChild.Name then if classEqual(primaryChild.ClassName, secondaryChild.ClassName) and primaryChild.Name == secondaryChild.Name then
visited[secondaryChild] = true visited[secondaryChild] = true
return primaryChild, secondaryChild return primaryChild, secondaryChild
@@ -77,22 +101,30 @@ function Reconciler:_reconcileChildren(rbx, item)
while true do while true do
local itemChild, rbxChild = findNextChildPair(item.Children, rbxChildren, visited) local itemChild, rbxChild = findNextChildPair(item.Children, rbxChildren, visited)
if not itemChild then if itemChild == nil then
break break
end end
reparent(self:reconcile(rbxChild, itemChild), rbx) local newRbxChild = self:reconcile(rbxChild, itemChild)
if newRbxChild ~= nil then
newRbxChild.Parent = rbx
end
end end
-- Reconcile any children that were deleted -- Reconcile any children that were deleted
while true do while true do
local rbxChild, itemChild = findNextChildPair(rbxChildren, item.Children, visited) local rbxChild, itemChild = findNextChildPair(rbxChildren, item.Children, visited)
if not rbxChild then if rbxChild == nil then
break break
end end
reparent(self:reconcile(rbxChild, itemChild), rbx) local newRbxChild = self:reconcile(rbxChild, itemChild)
if newRbxChild ~= nil then
newRbxChild.Parent = rbx
end
end end
end end
@@ -110,14 +142,13 @@ function Reconciler:_reify(item)
local rbx = Instance.new(className) local rbx = Instance.new(className)
rbx.Name = item.Name rbx.Name = item.Name
for key, property in pairs(item.Properties) do applyProperties(rbx, item.Properties)
-- TODO: Check for compound types, like Vector3!
rbx[key] = property.Value for _, child in ipairs(item.Children) do
reparent(self:_reify(child), rbx)
end end
self:_reconcileChildren(rbx, item) if item.Route ~= nil then
if item.Route then
self._routeMap:insert(item.Route, rbx) self._routeMap:insert(item.Route, rbx)
end end
@@ -125,10 +156,10 @@ function Reconciler:_reify(item)
end end
--[[ --[[
Clears any state that the Reconciler has, effectively restarting it. Clears any state that the Reconciler has, stopping it completely.
]] ]]
function Reconciler:clear() function Reconciler:destruct()
self._routeMap:clear() self._routeMap:destruct()
end end
--[[ --[[
@@ -137,8 +168,11 @@ end
]] ]]
function Reconciler:reconcile(rbx, item) function Reconciler:reconcile(rbx, item)
-- Item was deleted -- Item was deleted
if not item then if item == nil then
if rbx then if rbx ~= nil then
-- TODO: If this is a partition root, should we leave it alone?
self._routeMap:removeByRbx(rbx)
rbx:Destroy() rbx:Destroy()
end end
@@ -146,52 +180,52 @@ function Reconciler:reconcile(rbx, item)
end end
-- Item was created! -- Item was created!
if not rbx then if rbx == nil then
return self:_reify(item) return self:_reify(item)
end end
-- Item changed type! -- Item changed type!
if not classEqual(rbx, item.ClassName) then if not classEqual(rbx.ClassName, item.ClassName) then
self._routeMap:removeByRbx(rbx)
rbx:Destroy() rbx:Destroy()
rbx = self:_reify(item) return self:_reify(item)
end end
-- Apply all properties, Roblox will de-duplicate changes -- It's possible that the instance we're associating with this item hasn't
for key, property in pairs(item.Properties) do -- been inserted into the RouteMap yet.
-- TODO: Transform property value based on property.Type if item.Route ~= nil then
-- Right now, we assume that 'value' is primitive!
rbx[key] = property.Value
end
-- Use a dumb algorithm for reconciling children
self:_reconcileChildren(rbx, item)
if item.Route then
self._routeMap:insert(item.Route, rbx) self._routeMap:insert(item.Route, rbx)
end end
applyProperties(rbx, item.Properties)
self:_reconcileChildren(rbx, item)
return rbx return rbx
end end
function Reconciler:reconcileRoute(route, item, itemRoute) function Reconciler:reconcileRoute(rbxRoute, item, fileRoute)
local parent local parent
local rbx = game local rbx = game
for i = 1, #route do for i = 1, #rbxRoute do
local piece = route[i] local piece = rbxRoute[i]
local child = rbx:FindFirstChild(piece) local child = rbx:FindFirstChild(piece)
-- We should get services instead of making folders here. -- We should get services instead of making folders here.
if rbx == game and not child then if rbx == game and child == nil then
local _ local success
_, child = pcall(game.GetService, game, piece) success, child = pcall(game.GetService, game, piece)
-- That isn't a valid service!
if not success then
child = nil
end
end end
-- We don't want to create a folder if we're reaching our target item! -- We don't want to create a folder if we're reaching our target item!
if not child and i ~= #route then if child == nil and i ~= #rbxRoute then
child = Instance.new("Folder") child = Instance.new("Folder")
child.Parent = rbx child.Parent = rbx
child.Name = piece child.Name = piece
@@ -202,13 +236,15 @@ function Reconciler:reconcileRoute(route, item, itemRoute)
end end
-- Let's check the route map! -- Let's check the route map!
if not rbx then if rbx == nil then
rbx = self._routeMap:get(itemRoute) rbx = self._routeMap:get(fileRoute)
end end
rbx = self:reconcile(rbx, item) rbx = self:reconcile(rbx, item)
reparent(rbx, parent) if rbx ~= nil then
reparent(rbx, parent)
end
end end
return Reconciler return Reconciler

View File

@@ -25,6 +25,10 @@ end
function RouteMap:insert(route, rbx) function RouteMap:insert(route, rbx)
local hashed = hashRoute(route) local hashed = hashRoute(route)
-- Make sure that each route and instance are only present in RouteMap once.
self:removeByRoute(route)
self:removeByRbx(rbx)
self._map[hashed] = rbx self._map[hashed] = rbx
self._reverseMap[rbx] = hashed self._reverseMap[rbx] = hashed
self._connectionsByRbx[rbx] = rbx.AncestryChanged:Connect(function(_, parent) self._connectionsByRbx[rbx] = rbx.AncestryChanged:Connect(function(_, parent)
@@ -42,24 +46,36 @@ function RouteMap:removeByRoute(route)
local hashedRoute = hashRoute(route) local hashedRoute = hashRoute(route)
local rbx = self._map[hashedRoute] local rbx = self._map[hashedRoute]
if rbx then if rbx ~= nil then
self._map[hashedRoute] = nil self:_removeInternal(rbx, hashedRoute)
self._reverseMap[rbx] = nil
self._connectionsByRbx[rbx] = nil
end end
end end
function RouteMap:removeByRbx(rbx) function RouteMap:removeByRbx(rbx)
local hashedRoute = self._reverseMap[rbx] local hashedRoute = self._reverseMap[rbx]
if hashedRoute then if hashedRoute ~= nil then
self._map[hashedRoute] = nil self:_removeInternal(rbx, hashedRoute)
self._reverseMap[rbx] = nil
self._connectionsByRbx[rbx] = nil
end end
end end
function RouteMap:removeRbxDescendants(parentRbx) --[[
Correcly removes the given Roblox Instance/Route pair from the RouteMap.
]]
function RouteMap:_removeInternal(rbx, hashedRoute)
self._map[hashedRoute] = nil
self._reverseMap[rbx] = nil
self._connectionsByRbx[rbx]:Disconnect()
self._connectionsByRbx[rbx] = nil
self:_removeRbxDescendants(rbx)
end
--[[
Ensure that there are no descendants of the given Roblox Instance still
present in the map, guaranteeing that it has been cleaned out.
]]
function RouteMap:_removeRbxDescendants(parentRbx)
for rbx in pairs(self._reverseMap) do for rbx in pairs(self._reverseMap) do
if rbx:IsDescendantOf(parentRbx) then if rbx:IsDescendantOf(parentRbx) then
self:removeByRbx(rbx) self:removeByRbx(rbx)
@@ -67,7 +83,11 @@ function RouteMap:removeRbxDescendants(parentRbx)
end end
end end
function RouteMap:clear() --[[
Remove all items from the map and disconnect all connections, cleaning up
the RouteMap.
]]
function RouteMap:destruct()
self._map = {} self._map = {}
self._reverseMap = {} self._reverseMap = {}

349
server/Cargo.lock generated
View File

@@ -1,10 +1,7 @@
[[package]] [[package]]
name = "aho-corasick" name = "adler32"
version = "0.5.3" version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"memchr 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]] [[package]]
name = "aho-corasick" name = "aho-corasick"
@@ -29,7 +26,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]] [[package]]
name = "atty" name = "atty"
version = "0.2.8" version = "0.2.9"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -37,6 +34,15 @@ dependencies = [
"winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]]
name = "base64"
version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"byteorder 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"safemem 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]] [[package]]
name = "bitflags" name = "bitflags"
version = "0.4.0" version = "0.4.0"
@@ -72,7 +78,21 @@ dependencies = [
[[package]] [[package]]
name = "buf_redux" name = "buf_redux"
version = "0.1.3" version = "0.6.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"memchr 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
"safemem 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "build_const"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "byteorder"
version = "1.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]] [[package]]
@@ -80,11 +100,6 @@ name = "bytes"
version = "0.3.0" version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "cc"
version = "1.0.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]] [[package]]
name = "cfg-if" name = "cfg-if"
version = "0.1.2" version = "0.1.2"
@@ -99,6 +114,16 @@ dependencies = [
"time 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]]
name = "chrono"
version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"num-integer 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)",
"num-traits 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"time 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]] [[package]]
name = "chunked_transfer" name = "chunked_transfer"
version = "0.3.1" version = "0.3.1"
@@ -110,7 +135,7 @@ version = "2.31.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", "ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
"atty 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", "atty 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)",
"bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"strsim 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "strsim 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"textwrap 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "textwrap 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -118,6 +143,24 @@ dependencies = [
"vec_map 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "vec_map 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]]
name = "crc"
version = "1.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"build_const 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "deflate"
version = "0.7.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"adler32 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
"byteorder 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"gzip-header 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]] [[package]]
name = "dtoa" name = "dtoa"
version = "0.4.2" version = "0.4.2"
@@ -181,12 +224,11 @@ version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]] [[package]]
name = "env_logger" name = "enum_primitive"
version = "0.3.5" version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)",
"regex 0.1.80 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
@@ -199,15 +241,6 @@ dependencies = [
"redox_syscall 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", "redox_syscall 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]]
name = "flate2"
version = "0.2.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)",
"miniz-sys 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]] [[package]]
name = "fsevent" name = "fsevent"
version = "0.2.17" version = "0.2.17"
@@ -245,6 +278,20 @@ name = "gcc"
version = "0.3.54" version = "0.3.54"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "gzip-header"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"crc 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"enum_primitive 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "httparse"
version = "1.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]] [[package]]
name = "idna" name = "idna"
version = "0.1.4" version = "0.1.4"
@@ -310,7 +357,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]] [[package]]
name = "memchr" name = "memchr"
version = "0.1.11" version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -326,30 +373,21 @@ dependencies = [
[[package]] [[package]]
name = "mime" name = "mime"
version = "0.1.3" version = "0.2.6"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 0.6.15 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
name = "mime_guess" name = "mime_guess"
version = "1.5.0" version = "1.8.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"mime 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "mime 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
"phf 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)", "phf 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)",
"phf_codegen 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)", "phf_codegen 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)",
] "unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
[[package]]
name = "miniz-sys"
version = "0.1.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"cc 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
@@ -381,17 +419,18 @@ dependencies = [
[[package]] [[package]]
name = "multipart" name = "multipart"
version = "0.5.1" version = "0.13.6"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"buf_redux 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "buf_redux 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)",
"env_logger 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", "httparse 1.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
"memchr 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", "mime 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
"mime 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "mime_guess 1.8.4 (registry+https://github.com/rust-lang/crates.io-index)",
"mime_guess 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
"rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)",
"safemem 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", "tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
"twoway 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
@@ -457,11 +496,27 @@ dependencies = [
"num-traits 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]]
name = "num-traits"
version = "0.1.43"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"num-traits 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]] [[package]]
name = "num-traits" name = "num-traits"
version = "0.2.2" version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "num_cpus"
version = "1.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]] [[package]]
name = "percent-encoding" name = "percent-encoding"
version = "1.0.1" version = "1.0.1"
@@ -499,11 +554,12 @@ version = "0.7.21"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"siphasher 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "siphasher 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
name = "proc-macro2" name = "proc-macro2"
version = "0.3.1" version = "0.3.6"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -511,10 +567,10 @@ dependencies = [
[[package]] [[package]]
name = "quote" name = "quote"
version = "0.5.1" version = "0.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"proc-macro2 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
@@ -550,18 +606,6 @@ dependencies = [
"redox_syscall 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", "redox_syscall 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]]
name = "regex"
version = "0.1.80"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"aho-corasick 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)",
"memchr 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)",
"regex-syntax 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
"thread_local 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
"utf8-ranges 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]] [[package]]
name = "regex" name = "regex"
version = "0.2.10" version = "0.2.10"
@@ -569,19 +613,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"aho-corasick 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", "aho-corasick 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)",
"memchr 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "memchr 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"regex-syntax 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", "regex-syntax 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)",
"thread_local 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", "thread_local 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
"utf8-ranges 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "utf8-ranges 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
name = "regex-syntax" name = "regex-syntax"
version = "0.3.9" version = "0.5.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "regex-syntax"
version = "0.5.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"ucd-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "ucd-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -589,7 +628,7 @@ dependencies = [
[[package]] [[package]]
name = "remove_dir_all" name = "remove_dir_all"
version = "0.5.0" version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -597,33 +636,38 @@ dependencies = [
[[package]] [[package]]
name = "rojo" name = "rojo"
version = "0.4.4" version = "0.4.13"
dependencies = [ dependencies = [
"clap 2.31.2 (registry+https://github.com/rust-lang/crates.io-index)", "clap 2.31.2 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"notify 4.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "notify 4.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
"rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)",
"regex 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", "regex 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)",
"rouille 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "rouille 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.42 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.42 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_json 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
name = "rouille" name = "rouille"
version = "1.0.3" version = "2.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"base64 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"brotli2 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "brotli2 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"chrono 0.2.25 (registry+https://github.com/rust-lang/crates.io-index)", "chrono 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
"deflate 0.7.18 (registry+https://github.com/rust-lang/crates.io-index)",
"filetime 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", "filetime 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)",
"flate2 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)", "multipart 0.13.6 (registry+https://github.com/rust-lang/crates.io-index)",
"multipart 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.42 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.42 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_json 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)",
"sha1 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "sha1 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"term 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", "term 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
"threadpool 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"time 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)",
"tiny_http 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)", "tiny_http 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)",
"url 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -634,6 +678,11 @@ name = "rustc-serialize"
version = "0.3.24" version = "0.3.24"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "safemem"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]] [[package]]
name = "same-file" name = "same-file"
version = "1.0.2" version = "1.0.2"
@@ -644,46 +693,37 @@ dependencies = [
[[package]] [[package]]
name = "serde" name = "serde"
version = "0.6.15" version = "1.0.42"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"num 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "serde"
version = "1.0.37"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]] [[package]]
name = "serde_derive" name = "serde_derive"
version = "1.0.37" version = "1.0.42"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"proc-macro2 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"quote 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive_internals 0.23.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive_internals 0.23.1 (registry+https://github.com/rust-lang/crates.io-index)",
"syn 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)", "syn 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
name = "serde_derive_internals" name = "serde_derive_internals"
version = "0.23.0" version = "0.23.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"proc-macro2 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"syn 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)", "syn 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
name = "serde_json" name = "serde_json"
version = "1.0.13" version = "1.0.16"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"dtoa 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "dtoa 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
"itoa 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "itoa 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"num-traits 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.42 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
@@ -711,8 +751,8 @@ name = "syn"
version = "0.13.1" version = "0.13.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"proc-macro2 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"quote 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
"unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
@@ -722,7 +762,7 @@ version = "0.3.7"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
"remove_dir_all 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "remove_dir_all 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
@@ -752,23 +792,6 @@ dependencies = [
"unicode-width 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-width 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]]
name = "thread-id"
version = "2.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "thread_local"
version = "0.2.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"thread-id 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]] [[package]]
name = "thread_local" name = "thread_local"
version = "0.3.5" version = "0.3.5"
@@ -778,6 +801,14 @@ dependencies = [
"unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]]
name = "threadpool"
version = "1.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]] [[package]]
name = "time" name = "time"
version = "0.1.39" version = "0.1.39"
@@ -801,11 +832,27 @@ dependencies = [
"url 0.2.38 (registry+https://github.com/rust-lang/crates.io-index)", "url 0.2.38 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]]
name = "twoway"
version = "0.1.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"memchr 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]] [[package]]
name = "ucd-util" name = "ucd-util"
version = "0.1.1" version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "unicase"
version = "1.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"version_check 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]] [[package]]
name = "unicode-bidi" name = "unicode-bidi"
version = "0.3.4" version = "0.3.4"
@@ -857,11 +904,6 @@ dependencies = [
"percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]]
name = "utf8-ranges"
version = "0.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]] [[package]]
name = "utf8-ranges" name = "utf8-ranges"
version = "1.0.0" version = "1.0.0"
@@ -881,6 +923,11 @@ name = "vec_map"
version = "0.8.0" version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "version_check"
version = "0.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]] [[package]]
name = "void" name = "void"
version = "1.0.2" version = "1.0.2"
@@ -934,23 +981,28 @@ dependencies = [
] ]
[metadata] [metadata]
"checksum aho-corasick 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ca972c2ea5f742bfce5687b9aef75506a764f61d37f8f649047846a9686ddb66" "checksum adler32 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6cbd0b9af8587c72beadc9f72d35b9fbb070982c9e6203e46e93f10df25f8f45"
"checksum aho-corasick 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "d6531d44de723825aa81398a6415283229725a00fa30713812ab9323faa82fc4" "checksum aho-corasick 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "d6531d44de723825aa81398a6415283229725a00fa30713812ab9323faa82fc4"
"checksum ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" "checksum ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b"
"checksum ascii 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3ae7d751998c189c1d4468cf0a39bb2eae052a9c58d50ebb3b9591ee3813ad50" "checksum ascii 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3ae7d751998c189c1d4468cf0a39bb2eae052a9c58d50ebb3b9591ee3813ad50"
"checksum atty 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "af80143d6f7608d746df1520709e5d141c96f240b0e62b0aa41bdfb53374d9d4" "checksum atty 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)" = "6609a866dd1a1b2d0ee1362195bf3e4f6438abb2d80120b83b1e1f4fb6476dd0"
"checksum base64 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5032d51da2741729bfdaeb2664d9b8c6d9fd1e2b90715c660b6def36628499c2"
"checksum bitflags 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8dead7461c1127cf637931a1e50934eb6eee8bff2f74433ac7909e9afcee04a3" "checksum bitflags 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8dead7461c1127cf637931a1e50934eb6eee8bff2f74433ac7909e9afcee04a3"
"checksum bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "aad18937a628ec6abcd26d1489012cc0e18c21798210f491af69ded9b881106d" "checksum bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "aad18937a628ec6abcd26d1489012cc0e18c21798210f491af69ded9b881106d"
"checksum bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b3c30d3802dfb7281680d6285f2ccdaa8c2d8fee41f93805dba5c4cf50dc23cf" "checksum bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b3c30d3802dfb7281680d6285f2ccdaa8c2d8fee41f93805dba5c4cf50dc23cf"
"checksum brotli-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cb50f54b2e0c671b7ef1637a76237ebacbb293be179440d5d65ca288e42116bb" "checksum brotli-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cb50f54b2e0c671b7ef1637a76237ebacbb293be179440d5d65ca288e42116bb"
"checksum brotli2 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ea9d0bbab1235017a09226b079ed733bca4bf9ecb6b6102bd01aac79ea082dca" "checksum brotli2 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ea9d0bbab1235017a09226b079ed733bca4bf9ecb6b6102bd01aac79ea082dca"
"checksum buf_redux 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "b115bd9935c68b58f80ff867e1c46942c4aed79e78bcc8c2bc22d50f52bb9099" "checksum buf_redux 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "b9279646319ff816b05fb5897883ece50d7d854d12b59992683d4f8a71b0f949"
"checksum build_const 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "39092a32794787acd8525ee150305ff051b0aa6cc2abaf193924f5ab05425f39"
"checksum byteorder 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "73b5bdfe7ee3ad0b99c9801d58807a9dbc9e09196365b0203853b99889ab3c87"
"checksum bytes 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c129aff112dcc562970abb69e2508b40850dd24c274761bb50fb8a0067ba6c27" "checksum bytes 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c129aff112dcc562970abb69e2508b40850dd24c274761bb50fb8a0067ba6c27"
"checksum cc 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)" = "2b4911e4bdcb4100c7680e7e854ff38e23f1b34d4d9e079efae3da2801341ffc"
"checksum cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d4c819a1287eb618df47cc647173c5c4c66ba19d888a6e50d605672aed3140de" "checksum cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d4c819a1287eb618df47cc647173c5c4c66ba19d888a6e50d605672aed3140de"
"checksum chrono 0.2.25 (registry+https://github.com/rust-lang/crates.io-index)" = "9213f7cd7c27e95c2b57c49f0e69b1ea65b27138da84a170133fd21b07659c00" "checksum chrono 0.2.25 (registry+https://github.com/rust-lang/crates.io-index)" = "9213f7cd7c27e95c2b57c49f0e69b1ea65b27138da84a170133fd21b07659c00"
"checksum chrono 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1cce36c92cb605414e9b824f866f5babe0a0368e39ea07393b9b63cf3844c0e6"
"checksum chunked_transfer 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "498d20a7aaf62625b9bf26e637cf7736417cde1d0c99f1d04d1170229a85cf87" "checksum chunked_transfer 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "498d20a7aaf62625b9bf26e637cf7736417cde1d0c99f1d04d1170229a85cf87"
"checksum clap 2.31.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f0f16b89cbb9ee36d87483dc939fe9f1e13c05898d56d7b230a0d4dff033a536" "checksum clap 2.31.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f0f16b89cbb9ee36d87483dc939fe9f1e13c05898d56d7b230a0d4dff033a536"
"checksum crc 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bd5d02c0aac6bd68393ed69e00bbc2457f3e89075c6349db7189618dc4ddc1d7"
"checksum deflate 0.7.18 (registry+https://github.com/rust-lang/crates.io-index)" = "32c8120d981901a9970a3a1c97cf8b630e0fa8c3ca31e75b6fd6fd5f9f427b31"
"checksum dtoa 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "09c3753c3db574d215cba4ea76018483895d7bff25a31b49ba45db21c48e50ab" "checksum dtoa 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "09c3753c3db574d215cba4ea76018483895d7bff25a31b49ba45db21c48e50ab"
"checksum encoding 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "6b0d943856b990d12d3b55b359144ff341533e516d94098b1d3fc1ac666d36ec" "checksum encoding 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "6b0d943856b990d12d3b55b359144ff341533e516d94098b1d3fc1ac666d36ec"
"checksum encoding-index-japanese 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)" = "04e8b2ff42e9a05335dbf8b5c6f7567e5591d0d916ccef4e0b1710d32a0d0c91" "checksum encoding-index-japanese 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)" = "04e8b2ff42e9a05335dbf8b5c6f7567e5591d0d916ccef4e0b1710d32a0d0c91"
@@ -959,14 +1011,15 @@ dependencies = [
"checksum encoding-index-singlebyte 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)" = "3351d5acffb224af9ca265f435b859c7c01537c0849754d3db3fdf2bfe2ae84a" "checksum encoding-index-singlebyte 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)" = "3351d5acffb224af9ca265f435b859c7c01537c0849754d3db3fdf2bfe2ae84a"
"checksum encoding-index-tradchinese 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)" = "fd0e20d5688ce3cab59eb3ef3a2083a5c77bf496cb798dc6fcdb75f323890c18" "checksum encoding-index-tradchinese 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)" = "fd0e20d5688ce3cab59eb3ef3a2083a5c77bf496cb798dc6fcdb75f323890c18"
"checksum encoding_index_tests 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "a246d82be1c9d791c5dfde9a2bd045fc3cbba3fa2b11ad558f27d01712f00569" "checksum encoding_index_tests 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "a246d82be1c9d791c5dfde9a2bd045fc3cbba3fa2b11ad558f27d01712f00569"
"checksum env_logger 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "15abd780e45b3ea4f76b4e9a26ff4843258dd8a3eed2775a0e7368c2e7936c2f" "checksum enum_primitive 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "be4551092f4d519593039259a9ed8daedf0da12e5109c5280338073eaeb81180"
"checksum filetime 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)" = "714653f3e34871534de23771ac7b26e999651a0a228f47beb324dfdf1dd4b10f" "checksum filetime 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)" = "714653f3e34871534de23771ac7b26e999651a0a228f47beb324dfdf1dd4b10f"
"checksum flate2 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)" = "e6234dd4468ae5d1e2dbb06fe2b058696fdc50a339c68a393aefbf00bc81e423"
"checksum fsevent 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)" = "c4bbbf71584aeed076100b5665ac14e3d85eeb31fdbb45fbd41ef9a682b5ec05" "checksum fsevent 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)" = "c4bbbf71584aeed076100b5665ac14e3d85eeb31fdbb45fbd41ef9a682b5ec05"
"checksum fsevent-sys 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "1a772d36c338d07a032d5375a36f15f9a7043bf0cb8ce7cee658e037c6032874" "checksum fsevent-sys 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "1a772d36c338d07a032d5375a36f15f9a7043bf0cb8ce7cee658e037c6032874"
"checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" "checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82"
"checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" "checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7"
"checksum gcc 0.3.54 (registry+https://github.com/rust-lang/crates.io-index)" = "5e33ec290da0d127825013597dbdfc28bee4964690c7ce1166cbc2a7bd08b1bb" "checksum gcc 0.3.54 (registry+https://github.com/rust-lang/crates.io-index)" = "5e33ec290da0d127825013597dbdfc28bee4964690c7ce1166cbc2a7bd08b1bb"
"checksum gzip-header 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "0a9fcfe1c9ee125342355b2467bc29b9dfcb2124fcae27edb9cee6f4cc5ecd40"
"checksum httparse 1.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "c2f407128745b78abc95c0ffbe4e5d37427fdc0d45470710cfef8c44522a2e37"
"checksum idna 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "014b298351066f1512874135335d62a789ffe78a9974f94b43ed5621951eaf7d" "checksum idna 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "014b298351066f1512874135335d62a789ffe78a9974f94b43ed5621951eaf7d"
"checksum inotify 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "887fcc180136e77a85e6a6128579a719027b1bab9b1c38ea4444244fe262c20c" "checksum inotify 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "887fcc180136e77a85e6a6128579a719027b1bab9b1c38ea4444244fe262c20c"
"checksum itoa 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c069bbec61e1ca5a596166e55dfe4773ff745c3d16b700013bcaff9a6df2c682" "checksum itoa 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c069bbec61e1ca5a596166e55dfe4773ff745c3d16b700013bcaff9a6df2c682"
@@ -976,45 +1029,44 @@ dependencies = [
"checksum log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b" "checksum log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b"
"checksum log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "89f010e843f2b1a31dbd316b3b8d443758bc634bed37aabade59c686d644e0a2" "checksum log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "89f010e843f2b1a31dbd316b3b8d443758bc634bed37aabade59c686d644e0a2"
"checksum matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "100aabe6b8ff4e4a7e32c1c13523379802df0772b82466207ac25b013f193376" "checksum matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "100aabe6b8ff4e4a7e32c1c13523379802df0772b82466207ac25b013f193376"
"checksum memchr 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "d8b629fb514376c675b98c1421e80b151d3817ac42d7c667717d282761418d20" "checksum memchr 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "148fab2e51b4f1cfc66da2a7c32981d1d3c083a803978268bb11fe4b86925e7a"
"checksum memchr 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "796fba70e76612589ed2ce7f45282f5af869e0fdd7cc6199fa1aa1f1d591ba9d" "checksum memchr 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "796fba70e76612589ed2ce7f45282f5af869e0fdd7cc6199fa1aa1f1d591ba9d"
"checksum mime 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ec0c2f4d901bf1d4a2192a40b4b570ae3b19c51243e549defc1de741940aa787" "checksum mime 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "ba626b8a6de5da682e1caa06bdb42a335aee5a84db8e5046a3e8ab17ba0a3ae0"
"checksum mime_guess 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "422acd80644209a8c8c66a20514840d8c092eb1eab2898ca7c548cc1d64c8998" "checksum mime_guess 1.8.4 (registry+https://github.com/rust-lang/crates.io-index)" = "b7e2b09d08313f84e0fb82d13a4d859109a17543fe9af3b6d941dc1431f7de79"
"checksum miniz-sys 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "609ce024854aeb19a0ef7567d348aaa5a746b32fb72e336df7fcc16869d7e2b4"
"checksum mio 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a637d1ca14eacae06296a008fa7ad955347e34efcb5891cfd8ba05491a37907e" "checksum mio 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a637d1ca14eacae06296a008fa7ad955347e34efcb5891cfd8ba05491a37907e"
"checksum miow 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "3e690c5df6b2f60acd45d56378981e827ff8295562fc8d34f573deb267a59cd1" "checksum miow 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "3e690c5df6b2f60acd45d56378981e827ff8295562fc8d34f573deb267a59cd1"
"checksum multipart 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b68c9a0c757bd65893af529f7af6e7a71442e57ca6d9db1fa69b79e2f05f6b49" "checksum multipart 0.13.6 (registry+https://github.com/rust-lang/crates.io-index)" = "92f54eb45230c3aa20864ccf0c277eeaeadcf5e437e91731db498dbf7fbe0ec6"
"checksum net2 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)" = "9044faf1413a1057267be51b5afba8eb1090bd2231c693664aa1db716fe1eae0" "checksum net2 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)" = "9044faf1413a1057267be51b5afba8eb1090bd2231c693664aa1db716fe1eae0"
"checksum nix 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "bfb3ddedaa14746434a02041940495bf11325c22f6d36125d3bdd56090d50a79" "checksum nix 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "bfb3ddedaa14746434a02041940495bf11325c22f6d36125d3bdd56090d50a79"
"checksum notify 4.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "5c3812da3098f210a0bb440f9c008471a031aa4c1de07a264fdd75456c95a4eb" "checksum notify 4.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "5c3812da3098f210a0bb440f9c008471a031aa4c1de07a264fdd75456c95a4eb"
"checksum num 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "4703ad64153382334aa8db57c637364c322d3372e097840c72000dabdcf6156e" "checksum num 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "4703ad64153382334aa8db57c637364c322d3372e097840c72000dabdcf6156e"
"checksum num-integer 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)" = "f8d26da319fb45674985c78f1d1caf99aa4941f785d384a2ae36d0740bc3e2fe" "checksum num-integer 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)" = "f8d26da319fb45674985c78f1d1caf99aa4941f785d384a2ae36d0740bc3e2fe"
"checksum num-iter 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)" = "4b226df12c5a59b63569dd57fafb926d91b385dfce33d8074a412411b689d593" "checksum num-iter 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)" = "4b226df12c5a59b63569dd57fafb926d91b385dfce33d8074a412411b689d593"
"checksum num-traits 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)" = "92e5113e9fd4cc14ded8e499429f396a20f98c772a47cc8622a736e1ec843c31"
"checksum num-traits 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dee092fcdf725aee04dd7da1d21debff559237d49ef1cb3e69bcb8ece44c7364" "checksum num-traits 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dee092fcdf725aee04dd7da1d21debff559237d49ef1cb3e69bcb8ece44c7364"
"checksum num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c51a3322e4bca9d212ad9a158a02abc6934d005490c054a2778df73a70aa0a30"
"checksum percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" "checksum percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831"
"checksum phf 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)" = "cb325642290f28ee14d8c6201159949a872f220c62af6e110a56ea914fbe42fc" "checksum phf 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)" = "cb325642290f28ee14d8c6201159949a872f220c62af6e110a56ea914fbe42fc"
"checksum phf_codegen 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)" = "d62594c0bb54c464f633175d502038177e90309daf2e0158be42ed5f023ce88f" "checksum phf_codegen 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)" = "d62594c0bb54c464f633175d502038177e90309daf2e0158be42ed5f023ce88f"
"checksum phf_generator 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)" = "6b07ffcc532ccc85e3afc45865469bf5d9e4ef5bfcf9622e3cfe80c2d275ec03" "checksum phf_generator 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)" = "6b07ffcc532ccc85e3afc45865469bf5d9e4ef5bfcf9622e3cfe80c2d275ec03"
"checksum phf_shared 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)" = "07e24b0ca9643bdecd0632f2b3da6b1b89bbb0030e0b992afc1113b23a7bc2f2" "checksum phf_shared 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)" = "07e24b0ca9643bdecd0632f2b3da6b1b89bbb0030e0b992afc1113b23a7bc2f2"
"checksum proc-macro2 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "388d7ea47318c5ccdeb9ba6312cee7d3f65dd2804be8580a170fce410d50b786" "checksum proc-macro2 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "49b6a521dc81b643e9a51e0d1cf05df46d5a2f3c0280ea72bcb68276ba64a118"
"checksum quote 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7b0ff51282f28dc1b53fd154298feaa2e77c5ea0dba68e1fd8b03b72fbe13d2a" "checksum quote 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9949cfe66888ffe1d53e6ec9d9f3b70714083854be20fd5e271b232a017401e8"
"checksum rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)" = "15a732abf9d20f0ad8eeb6f909bf6868722d9a06e1e50802b6a70351f40b4eb1" "checksum rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)" = "15a732abf9d20f0ad8eeb6f909bf6868722d9a06e1e50802b6a70351f40b4eb1"
"checksum rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "eba5f8cb59cc50ed56be8880a5c7b496bfd9bd26394e176bc67884094145c2c5" "checksum rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "eba5f8cb59cc50ed56be8880a5c7b496bfd9bd26394e176bc67884094145c2c5"
"checksum redox_syscall 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)" = "0d92eecebad22b767915e4d529f89f28ee96dbbf5a4810d2b844373f136417fd" "checksum redox_syscall 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)" = "0d92eecebad22b767915e4d529f89f28ee96dbbf5a4810d2b844373f136417fd"
"checksum redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7e891cfe48e9100a70a3b6eb652fef28920c117d366339687bd5576160db0f76" "checksum redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7e891cfe48e9100a70a3b6eb652fef28920c117d366339687bd5576160db0f76"
"checksum regex 0.1.80 (registry+https://github.com/rust-lang/crates.io-index)" = "4fd4ace6a8cf7860714a2c2280d6c1f7e6a413486c13298bbc86fd3da019402f"
"checksum regex 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "aec3f58d903a7d2a9dc2bf0e41a746f4530e0cab6b615494e058f67a3ef947fb" "checksum regex 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "aec3f58d903a7d2a9dc2bf0e41a746f4530e0cab6b615494e058f67a3ef947fb"
"checksum regex-syntax 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "f9ec002c35e86791825ed294b50008eea9ddfc8def4420124fbc6b08db834957" "checksum regex-syntax 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)" = "bd90079345f4a4c3409214734ae220fd773c6f2e8a543d07370c6c1c369cfbfb"
"checksum regex-syntax 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "b2550876c31dc914696a6c2e01cbce8afba79a93c8ae979d2fe051c0230b3756" "checksum remove_dir_all 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3488ba1b9a2084d38645c4c08276a1752dcbf2c7130d74f1569681ad5d2799c5"
"checksum remove_dir_all 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "dfc5b3ce5d5ea144bb04ebd093a9e14e9765bcfec866aecda9b6dec43b3d1e24" "checksum rouille 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cc1f8407af80b0630983b2c1f1860dda1960fdec8d3ee75ba8db14937756d3a0"
"checksum rouille 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "d6415f261a8775bef50e9fcfb14ed73209ce637f753f9d1c8c6122559e559001"
"checksum rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)" = "dcf128d1287d2ea9d80910b5f1120d0b8eede3fbf1abe91c40d39ea7d51e6fda" "checksum rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)" = "dcf128d1287d2ea9d80910b5f1120d0b8eede3fbf1abe91c40d39ea7d51e6fda"
"checksum safemem 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e27a8b19b835f7aea908818e871f5cc3a5a186550c30773be987e155e8163d8f"
"checksum same-file 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "cfb6eded0b06a0b512c8ddbcf04089138c9b4362c2f696f3c3d76039d68f3637" "checksum same-file 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "cfb6eded0b06a0b512c8ddbcf04089138c9b4362c2f696f3c3d76039d68f3637"
"checksum serde 0.6.15 (registry+https://github.com/rust-lang/crates.io-index)" = "c97b18e9e53de541f11e497357d6c5eaeb39f0cb9c8734e274abe4935f6991fa" "checksum serde 1.0.42 (registry+https://github.com/rust-lang/crates.io-index)" = "a73973861352c932ed1365ce22b32467ce260ac4c8db11cf750ce56334ff2dcf"
"checksum serde 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)" = "d3bcee660dcde8f52c3765dd9ca5ee36b4bf35470a738eb0bd5a8752b0389645" "checksum serde_derive 1.0.42 (registry+https://github.com/rust-lang/crates.io-index)" = "b392c5a0cebb98121454531c50e60e2ffe0fbeb1a44da277da2d681d08d7dc0b"
"checksum serde_derive 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)" = "f1711ab8b208541fa8de00425f6a577d90f27bb60724d2bb5fd911314af9668f" "checksum serde_derive_internals 0.23.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9d30c4596450fd7bbda79ef15559683f9a79ac0193ea819db90000d7e1cae794"
"checksum serde_derive_internals 0.23.0 (registry+https://github.com/rust-lang/crates.io-index)" = "89b340a48245bc03ddba31d0ff1709c118df90edc6adabaca4aac77aea181cce" "checksum serde_json 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)" = "8c6c4e049dc657a99e394bd85c22acbf97356feeec6dbf44150f2dcf79fb3118"
"checksum serde_json 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)" = "5c508584d9913df116b91505eec55610a2f5b16e9ed793c46e4d0152872b3e74"
"checksum sha1 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cc30b1e1e8c40c121ca33b86c23308a090d19974ef001b4bf6e61fd1a0fb095c" "checksum sha1 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cc30b1e1e8c40c121ca33b86c23308a090d19974ef001b4bf6e61fd1a0fb095c"
"checksum siphasher 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "0df90a788073e8d0235a67e50441d47db7c8ad9debd91cbf43736a2a92d36537" "checksum siphasher 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "0df90a788073e8d0235a67e50441d47db7c8ad9debd91cbf43736a2a92d36537"
"checksum slab 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "d807fd58c4181bbabed77cb3b891ba9748241a552bcc5be698faaebefc54f46e" "checksum slab 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "d807fd58c4181bbabed77cb3b891ba9748241a552bcc5be698faaebefc54f46e"
@@ -1024,12 +1076,13 @@ dependencies = [
"checksum term 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "f2077e54d38055cf1ca0fd7933a2e00cd3ec8f6fed352b2a377f06dcdaaf3281" "checksum term 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "f2077e54d38055cf1ca0fd7933a2e00cd3ec8f6fed352b2a377f06dcdaaf3281"
"checksum termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "689a3bdfaab439fd92bc87df5c4c78417d3cbe537487274e9b0b2dce76e92096" "checksum termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "689a3bdfaab439fd92bc87df5c4c78417d3cbe537487274e9b0b2dce76e92096"
"checksum textwrap 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c0b59b6b4b44d867f1370ef1bd91bfb262bf07bf0ae65c202ea2fbc16153b693" "checksum textwrap 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c0b59b6b4b44d867f1370ef1bd91bfb262bf07bf0ae65c202ea2fbc16153b693"
"checksum thread-id 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a9539db560102d1cef46b8b78ce737ff0bb64e7e18d35b2a5688f7d097d0ff03"
"checksum thread_local 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "8576dbbfcaef9641452d5cf0df9b0e7eeab7694956dd33bb61515fb8f18cfdd5"
"checksum thread_local 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "279ef31c19ededf577bfd12dfae728040a21f635b06a24cd670ff510edd38963" "checksum thread_local 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "279ef31c19ededf577bfd12dfae728040a21f635b06a24cd670ff510edd38963"
"checksum threadpool 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e2f0c90a5f3459330ac8bc0d2f879c693bb7a2f59689c1083fc4ef83834da865"
"checksum time 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)" = "a15375f1df02096fb3317256ce2cee6a1f42fc84ea5ad5fc8c421cfe40c73098" "checksum time 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)" = "a15375f1df02096fb3317256ce2cee6a1f42fc84ea5ad5fc8c421cfe40c73098"
"checksum tiny_http 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)" = "2f4d55c9a213880d1f0c89ded183f209c6e45b912ca6c7df6f93c163773572e1" "checksum tiny_http 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)" = "2f4d55c9a213880d1f0c89ded183f209c6e45b912ca6c7df6f93c163773572e1"
"checksum twoway 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "59b11b2b5241ba34be09c3cc85a36e56e48f9888862e19cedf23336d35316ed1"
"checksum ucd-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "fd2be2d6639d0f8fe6cdda291ad456e23629558d466e2789d2c3e9892bda285d" "checksum ucd-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "fd2be2d6639d0f8fe6cdda291ad456e23629558d466e2789d2c3e9892bda285d"
"checksum unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7f4765f83163b74f957c797ad9253caf97f103fb064d3999aea9568d09fc8a33"
"checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" "checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5"
"checksum unicode-normalization 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "51ccda9ef9efa3f7ef5d91e8f9b83bbe6955f9bf86aec89d5cce2c874625920f" "checksum unicode-normalization 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "51ccda9ef9efa3f7ef5d91e8f9b83bbe6955f9bf86aec89d5cce2c874625920f"
"checksum unicode-width 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "bf3a113775714a22dcb774d8ea3655c53a32debae63a063acc00a91cc586245f" "checksum unicode-width 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "bf3a113775714a22dcb774d8ea3655c53a32debae63a063acc00a91cc586245f"
@@ -1037,10 +1090,10 @@ dependencies = [
"checksum unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "382810877fe448991dfc7f0dd6e3ae5d58088fd0ea5e35189655f84e6814fa56" "checksum unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "382810877fe448991dfc7f0dd6e3ae5d58088fd0ea5e35189655f84e6814fa56"
"checksum url 0.2.38 (registry+https://github.com/rust-lang/crates.io-index)" = "cbaa8377a162d88e7d15db0cf110c8523453edcbc5bc66d2b6fffccffa34a068" "checksum url 0.2.38 (registry+https://github.com/rust-lang/crates.io-index)" = "cbaa8377a162d88e7d15db0cf110c8523453edcbc5bc66d2b6fffccffa34a068"
"checksum url 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f808aadd8cfec6ef90e4a14eb46f24511824d1ac596b9682703c87056c8678b7" "checksum url 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f808aadd8cfec6ef90e4a14eb46f24511824d1ac596b9682703c87056c8678b7"
"checksum utf8-ranges 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a1ca13c08c41c9c3e04224ed9ff80461d97e121589ff27c753a16cb10830ae0f"
"checksum utf8-ranges 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "662fab6525a98beff2921d7f61a39e7d59e0b425ebc7d0d9e66d316e55124122" "checksum utf8-ranges 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "662fab6525a98beff2921d7f61a39e7d59e0b425ebc7d0d9e66d316e55124122"
"checksum uuid 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)" = "78c590b5bd79ed10aad8fb75f078a59d8db445af6c743e55c4a53227fc01c13f" "checksum uuid 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)" = "78c590b5bd79ed10aad8fb75f078a59d8db445af6c743e55c4a53227fc01c13f"
"checksum vec_map 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "887b5b631c2ad01628bbbaa7dd4c869f80d3186688f8d0b6f58774fbe324988c" "checksum vec_map 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "887b5b631c2ad01628bbbaa7dd4c869f80d3186688f8d0b6f58774fbe324988c"
"checksum version_check 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6b772017e347561807c1aa192438c5fd74242a670a6cffacc40f2defd1dc069d"
"checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" "checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d"
"checksum walkdir 2.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "63636bd0eb3d00ccb8b9036381b526efac53caf112b7783b730ab3f8e44da369" "checksum walkdir 2.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "63636bd0eb3d00ccb8b9036381b526efac53caf112b7783b730ab3f8e44da369"
"checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" "checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a"

View File

@@ -1,6 +1,6 @@
[package] [package]
name = "rojo" name = "rojo"
version = "0.4.4" version = "0.4.13"
authors = ["Lucien Greathouse <me@lpghatguy.com>"] authors = ["Lucien Greathouse <me@lpghatguy.com>"]
description = "A tool to create robust Roblox projects" description = "A tool to create robust Roblox projects"
license = "MIT" license = "MIT"
@@ -12,7 +12,7 @@ path = "src/bin.rs"
[dependencies] [dependencies]
clap = "2.27.1" clap = "2.27.1"
rouille = "1.0" rouille = "2.1.0"
serde = "1.0" serde = "1.0"
serde_derive = "1.0" serde_derive = "1.0"
serde_json = "1.0" serde_json = "1.0"

View File

@@ -14,49 +14,42 @@ use web;
pub fn serve(project_path: &PathBuf, verbose: bool, port: Option<u64>) { pub fn serve(project_path: &PathBuf, verbose: bool, port: Option<u64>) {
let server_id = rand::random::<u64>(); let server_id = rand::random::<u64>();
if verbose {
println!("Attempting to locate project at {}...", project_path.display());
}
let project = match Project::load(project_path) { let project = match Project::load(project_path) {
Ok(v) => { Ok(project) => {
println!("Using project from {}", project_path.display()); println!("Using project \"{}\" from {}", project.name, project_path.display());
v project
}, },
Err(err) => { Err(err) => {
match err { match err {
ProjectLoadError::InvalidJson(serde_err) => { ProjectLoadError::InvalidJson(serde_err) => {
eprintln!( eprintln!("Project contained invalid JSON!");
"Found invalid JSON!\nProject in: {}\nError: {}", eprintln!("{}", project_path.display());
project_path.display(), eprintln!("Error: {}", serde_err);
serde_err,
);
process::exit(1); process::exit(1);
}, },
ProjectLoadError::FailedToOpen | ProjectLoadError::FailedToRead => { ProjectLoadError::FailedToOpen | ProjectLoadError::FailedToRead => {
eprintln!("Found project file, but failed to read it!"); eprintln!("Found project file, but failed to read it!");
eprintln!( eprintln!("Check the permissions of the project file at {}", project_path.display());
"Check the permissions of the project file at\n{}",
project_path.display(),
);
process::exit(1); process::exit(1);
}, },
_ => { ProjectLoadError::DidNotExist => {
// Any other error is fine; use the default project. eprintln!("Found no project file! Create one using 'rojo init'");
println!("Found no project file, using default project..."); eprintln!("Checked for a project at {}", project_path.display());
Project::default()
process::exit(1);
}, },
} }
}, },
}; };
let web_config = web::WebConfig { if project.partitions.len() == 0 {
verbose, println!("");
port: port.unwrap_or(project.serve_port), println!("This project has no partitions and will not do anything when served!");
server_id, println!("This is usually a mistake -- edit rojo.json!");
}; println!("");
}
lazy_static! { lazy_static! {
static ref PLUGIN_CHAIN: PluginChain = PluginChain::new(vec![ static ref PLUGIN_CHAIN: PluginChain = PluginChain::new(vec![
@@ -86,8 +79,6 @@ pub fn serve(project_path: &PathBuf, verbose: bool, port: Option<u64>) {
Arc::new(Mutex::new(vfs)) Arc::new(Mutex::new(vfs))
}; };
println!("Server listening on port {}", web_config.port);
{ {
let vfs = vfs.clone(); let vfs = vfs.clone();
thread::spawn(move || { thread::spawn(move || {
@@ -95,5 +86,13 @@ pub fn serve(project_path: &PathBuf, verbose: bool, port: Option<u64>) {
}); });
} }
let web_config = web::WebConfig {
verbose,
port: port.unwrap_or(project.serve_port),
server_id,
};
println!("Server listening on port {}", web_config.port);
web::start(web_config, project.clone(), &PLUGIN_CHAIN, vfs.clone()); web::start(web_config, project.clone(), &PLUGIN_CHAIN, vfs.clone());
} }

View File

@@ -9,13 +9,6 @@ pub enum TransformFileResult {
// TODO: Error case // TODO: Error case
} }
pub enum RbxChangeResult {
Write(Option<VfsItem>),
Pass,
// TODO: Error case
}
pub enum FileChangeResult { pub enum FileChangeResult {
MarkChanged(Option<Vec<Route>>), MarkChanged(Option<Vec<Route>>),
Pass, Pass,
@@ -26,10 +19,6 @@ pub trait Plugin {
/// into a Roblox instance. /// into a Roblox instance.
fn transform_file(&self, plugins: &PluginChain, vfs_item: &VfsItem) -> TransformFileResult; fn transform_file(&self, plugins: &PluginChain, vfs_item: &VfsItem) -> TransformFileResult;
/// Invoked when a Roblox Instance change is reported by the Roblox Studio
/// plugin and needs to be turned into a file to save.
fn handle_rbx_change(&self, route: &Route, rbx_item: &RbxInstance) -> RbxChangeResult;
/// Invoked when a file changes on the filesystem. The result defines what /// Invoked when a file changes on the filesystem. The result defines what
/// routes are marked as needing to be refreshed. /// routes are marked as needing to be refreshed.
fn handle_file_change(&self, route: &Route) -> FileChangeResult; fn handle_file_change(&self, route: &Route) -> FileChangeResult;
@@ -58,17 +47,6 @@ impl PluginChain {
None None
} }
pub fn handle_rbx_change(&self, route: &Route, rbx_item: &RbxInstance) -> Option<VfsItem> {
for plugin in &self.plugins {
match plugin.handle_rbx_change(route, rbx_item) {
RbxChangeResult::Write(vfs_item) => return vfs_item,
RbxChangeResult::Pass => {},
}
}
None
}
pub fn handle_file_change(&self, route: &Route) -> Option<Vec<Route>> { pub fn handle_file_change(&self, route: &Route) -> Option<Vec<Route>> {
for plugin in &self.plugins { for plugin in &self.plugins {
match plugin.handle_file_change(route) { match plugin.handle_file_change(route) {

View File

@@ -1,7 +1,7 @@
use std::collections::HashMap; use std::collections::HashMap;
use core::Route; use core::Route;
use plugin::{Plugin, PluginChain, TransformFileResult, RbxChangeResult, FileChangeResult}; use plugin::{Plugin, PluginChain, TransformFileResult, FileChangeResult};
use rbx::{RbxInstance, RbxValue}; use rbx::{RbxInstance, RbxValue};
use vfs::VfsItem; use vfs::VfsItem;
@@ -60,8 +60,4 @@ impl Plugin for DefaultPlugin {
fn handle_file_change(&self, route: &Route) -> FileChangeResult { fn handle_file_change(&self, route: &Route) -> FileChangeResult {
FileChangeResult::MarkChanged(Some(vec![route.clone()])) FileChangeResult::MarkChanged(Some(vec![route.clone()]))
} }
fn handle_rbx_change(&self, _route: &Route, _rbx_item: &RbxInstance) -> RbxChangeResult {
RbxChangeResult::Pass
}
} }

View File

@@ -2,7 +2,7 @@ use regex::Regex;
use serde_json; use serde_json;
use core::Route; use core::Route;
use plugin::{Plugin, PluginChain, TransformFileResult, RbxChangeResult, FileChangeResult}; use plugin::{Plugin, PluginChain, TransformFileResult, FileChangeResult};
use rbx::RbxInstance; use rbx::RbxInstance;
use vfs::VfsItem; use vfs::VfsItem;
@@ -10,6 +10,8 @@ lazy_static! {
static ref JSON_MODEL_PATTERN: Regex = Regex::new(r"^(.*?)\.model\.json$").unwrap(); static ref JSON_MODEL_PATTERN: Regex = Regex::new(r"^(.*?)\.model\.json$").unwrap();
} }
static JSON_MODEL_INIT: &'static str = "init.model.json";
pub struct JsonModelPlugin; pub struct JsonModelPlugin;
impl JsonModelPlugin { impl JsonModelPlugin {
@@ -19,7 +21,7 @@ impl JsonModelPlugin {
} }
impl Plugin for JsonModelPlugin { impl Plugin for JsonModelPlugin {
fn transform_file(&self, _plugins: &PluginChain, vfs_item: &VfsItem) -> TransformFileResult { fn transform_file(&self, plugins: &PluginChain, vfs_item: &VfsItem) -> TransformFileResult {
match vfs_item { match vfs_item {
&VfsItem::File { ref contents, .. } => { &VfsItem::File { ref contents, .. } => {
let rbx_name = match JSON_MODEL_PATTERN.captures(vfs_item.name()) { let rbx_name = match JSON_MODEL_PATTERN.captures(vfs_item.name()) {
@@ -41,15 +43,57 @@ impl Plugin for JsonModelPlugin {
TransformFileResult::Value(Some(rbx_item)) TransformFileResult::Value(Some(rbx_item))
}, },
&VfsItem::Dir { .. } => TransformFileResult::Pass, &VfsItem::Dir { ref children, .. } => {
let init_item = match children.get(JSON_MODEL_INIT) {
Some(v) => v,
None => return TransformFileResult::Pass,
};
let mut rbx_item = match self.transform_file(plugins, init_item) {
TransformFileResult::Value(Some(item)) => item,
TransformFileResult::Value(None) | TransformFileResult::Pass => {
eprintln!("Inconsistency detected in JsonModelPlugin!");
return TransformFileResult::Pass;
},
};
rbx_item.name.clear();
rbx_item.name.push_str(vfs_item.name());
rbx_item.route = Some(vfs_item.route().to_vec());
for (child_name, child_item) in children {
if child_name == init_item.name() {
continue;
}
match plugins.transform_file(child_item) {
Some(child_rbx_item) => {
rbx_item.children.push(child_rbx_item);
},
_ => {},
}
}
TransformFileResult::Value(Some(rbx_item))
},
} }
} }
fn handle_file_change(&self, _route: &Route) -> FileChangeResult { fn handle_file_change(&self, route: &Route) -> FileChangeResult {
FileChangeResult::Pass let leaf = match route.last() {
} Some(v) => v,
None => return FileChangeResult::Pass,
};
fn handle_rbx_change(&self, _route: &Route, _rbx_item: &RbxInstance) -> RbxChangeResult { let is_init = leaf == JSON_MODEL_INIT;
RbxChangeResult::Pass
if is_init {
let mut changed = route.clone();
changed.pop();
FileChangeResult::MarkChanged(Some(vec![changed]))
} else {
FileChangeResult::Pass
}
} }
} }

View File

@@ -3,7 +3,7 @@ use std::collections::HashMap;
use regex::Regex; use regex::Regex;
use core::Route; use core::Route;
use plugin::{Plugin, PluginChain, TransformFileResult, RbxChangeResult, FileChangeResult}; use plugin::{Plugin, PluginChain, TransformFileResult, FileChangeResult};
use rbx::{RbxInstance, RbxValue}; use rbx::{RbxInstance, RbxValue};
use vfs::VfsItem; use vfs::VfsItem;
@@ -79,6 +79,7 @@ impl Plugin for ScriptPlugin {
rbx_item.name.clear(); rbx_item.name.clear();
rbx_item.name.push_str(vfs_item.name()); rbx_item.name.push_str(vfs_item.name());
rbx_item.route = Some(vfs_item.route().to_vec());
for (child_name, child_item) in children { for (child_name, child_item) in children {
if child_name == init_item.name() { if child_name == init_item.name() {
@@ -117,8 +118,4 @@ impl Plugin for ScriptPlugin {
FileChangeResult::Pass FileChangeResult::Pass
} }
} }
fn handle_rbx_change(&self, _route: &Route, _rbx_item: &RbxInstance) -> RbxChangeResult {
RbxChangeResult::Pass
}
} }

View File

@@ -6,7 +6,11 @@ use std::collections::HashMap;
pub struct RbxInstance { pub struct RbxInstance {
pub name: String, pub name: String,
pub class_name: String, pub class_name: String,
#[serde(default = "Vec::new")]
pub children: Vec<RbxInstance>, pub children: Vec<RbxInstance>,
#[serde(default = "HashMap::new")]
pub properties: HashMap<String, RbxValue>, pub properties: HashMap<String, RbxValue>,
/// The route that this instance was generated from, if there was one. /// The route that this instance was generated from, if there was one.

View File

@@ -9,17 +9,22 @@ use std::collections::HashMap;
pub enum VfsItem { pub enum VfsItem {
File { File {
route: Vec<String>, route: Vec<String>,
file_name: String,
contents: String, contents: String,
}, },
Dir { Dir {
route: Vec<String>, route: Vec<String>,
file_name: String,
children: HashMap<String, VfsItem>, children: HashMap<String, VfsItem>,
}, },
} }
impl VfsItem { impl VfsItem {
pub fn name(&self) -> &String { pub fn name(&self) -> &String {
self.route().last().unwrap() match self {
&VfsItem::File { ref file_name , .. } => file_name,
&VfsItem::Dir { ref file_name , .. } => file_name,
}
} }
pub fn route(&self) -> &[String] { pub fn route(&self) -> &[String] {

View File

@@ -111,8 +111,11 @@ impl VfsSession {
} }
} }
let file_name = path.file_name().unwrap().to_string_lossy().into_owned();
Ok(VfsItem::Dir { Ok(VfsItem::Dir {
route: route.iter().cloned().collect::<Vec<_>>(), route: route.iter().cloned().collect::<Vec<_>>(),
file_name,
children, children,
}) })
} }
@@ -131,8 +134,11 @@ impl VfsSession {
Err(_) => return Err(()), Err(_) => return Err(()),
} }
let file_name = path.file_name().unwrap().to_string_lossy().into_owned();
Ok(VfsItem::File { Ok(VfsItem::File {
route: route.iter().cloned().collect::<Vec<_>>(), route: route.iter().cloned().collect::<Vec<_>>(),
file_name,
contents, contents,
}) })
} }

View File

@@ -77,13 +77,14 @@ impl VfsWatcher {
for (ref partition_name, ref root_path) in vfs.get_partitions() { for (ref partition_name, ref root_path) in vfs.get_partitions() {
let (tx, rx) = mpsc::channel(); let (tx, rx) = mpsc::channel();
let mut watcher: RecommendedWatcher = Watcher::new(tx, Duration::from_secs(1)) let mut watcher: RecommendedWatcher = Watcher::new(tx, Duration::from_millis(200))
.expect("Unable to create watcher! This is a bug in Rojo."); .expect("Unable to create watcher! This is a bug in Rojo.");
match watcher.watch(&root_path, RecursiveMode::Recursive) { match watcher.watch(&root_path, RecursiveMode::Recursive) {
Ok(_) => (), Ok(_) => (),
Err(_) => { Err(_) => {
panic!("Unable to watch partition {}, with path {}! Make sure that it's a file or directory.", partition_name, root_path.display()); eprintln!("WARNING: Unable to watch partition {}, with path {}\nMake sure that it's a file or directory.", partition_name, root_path.display());
continue;
}, },
} }

View File

View File

@@ -5,6 +5,14 @@
"src": { "src": {
"path": "src", "path": "src",
"target": "ReplicatedFirst" "target": "ReplicatedFirst"
},
"extra": {
"path": "extra-script.lua",
"target": "ReplicatedStorage.ExtraScript"
},
"does-not-exist": {
"path": "hahah",
"target": "ReplicatedStorage.Never"
} }
} }
} }

View File

@@ -0,0 +1 @@
print("Hello, world, from my tool!")

View File

@@ -0,0 +1,4 @@
{
"Name": "SomeTool",
"ClassName": "Tool"
}

1
test-project/src/a/b.lua Normal file
View File

@@ -0,0 +1 @@
print("HEY!")

View File

@@ -4,14 +4,11 @@
"Children": [ "Children": [
{ {
"Name": "Some Part", "Name": "Some Part",
"ClassName": "Part", "ClassName": "Part"
"Children": [],
"Properties": {}
}, },
{ {
"Name": "Some StringValue", "Name": "Some StringValue",
"ClassName": "StringValue", "ClassName": "StringValue",
"Children": [],
"Properties": { "Properties": {
"Value": { "Value": {
"Type": "String", "Type": "String",
@@ -19,6 +16,5 @@
} }
} }
} }
], ]
"Properties": {}
} }