Compare commits

...

16 Commits

Author SHA1 Message Date
Lucien Greathouse
dff2df4c79 Update Changelog 2020-10-28 14:53:42 -07:00
Lucien Greathouse
7fe99a2483 Update dependencies 2020-10-28 14:51:59 -07:00
Lucien Greathouse
5d7640f6fa Update to latest rbx-dom from dom-v1 branch 2020-10-28 14:46:12 -07:00
Lucien Greathouse
937c3713dd Update plugin version. Release 0.5.4 (take 3) 2020-02-27 10:16:31 -08:00
Lucien Greathouse
f3ba1b1f16 Turn off rustfmt/clippy for 0.5.x branch 2020-02-26 18:15:02 -08:00
Lucien Greathouse
1c9905f6e2 Port GitHub workflows from master branch 2020-02-26 18:04:17 -08:00
Lucien Greathouse
e5d16e768e Release 0.5.4 2020-02-26 18:02:49 -08:00
Lucien Greathouse
61dd407126 Merge changelog from master 2020-02-26 17:55:52 -08:00
Lucien Greathouse
a34eeb163a Upgrade rbx-dom 2019-10-17 17:33:07 -07:00
Lucien Greathouse
1a78e9178a Release 0.5.3 2019-10-15 18:16:21 -07:00
Lucien Greathouse
1659cf7a01 Plugin: Upgrade to latest rbx_dom_lua 2019-10-15 18:05:43 -07:00
Lucien Greathouse
78d97e162c Release v0.5.2 2019-10-14 17:33:43 -07:00
Lucien Greathouse
5d0aa1193f Fix LocalizationTable output order by switching to a BTreeMap.
ACTUALLY closes #173.
2019-10-14 17:29:34 -07:00
Lucien Greathouse
126040a87b Add build tests for init.meta.json 2019-10-12 23:59:54 -07:00
Lucien Greathouse
2c408f4047 Fix errors in 'Sync Details' page 2019-10-08 16:17:13 -07:00
Lucien Greathouse
b53cda787a Add end-to-end build test for Script.Disabled via .meta.json 2019-10-08 16:09:27 -07:00
21 changed files with 1307 additions and 1079 deletions

30
.github/workflows/ci.yml vendored Normal file
View File

@@ -0,0 +1,30 @@
name: CI
on: [push]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
rust_version: [stable, "1.40.0"]
steps:
- uses: actions/checkout@v1
- name: Setup Rust toolchain
run: rustup default ${{ matrix.rust_version }}
- name: Build
run: cargo build --locked --verbose
- name: Run tests
run: cargo test --locked --verbose
- name: Build (All Features)
run: cargo build --locked --verbose --all-features
- name: Run tests (All Features)
run: cargo test --locked --verbose --all-features

60
.github/workflows/release.yml vendored Normal file
View File

@@ -0,0 +1,60 @@
name: Release
on:
push:
tags: ["*"]
jobs:
windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v1
- name: Build release binary
run: cargo build --verbose --locked --release
- name: Upload artifacts
uses: actions/upload-artifact@v1
with:
name: rojo-win64
path: target/release/rojo.exe
macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v1
- name: Install Rust
run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
- name: Build release binary
run: |
source $HOME/.cargo/env
cargo build --verbose --locked --release
env:
OPENSSL_STATIC: 1
- name: Upload artifacts
uses: actions/upload-artifact@v1
with:
name: rojo-macos
path: target/release/rojo
linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Build
run: cargo build --locked --verbose --release
env:
OPENSSL_STATIC: 1
- name: Upload artifacts
uses: actions/upload-artifact@v1
with:
name: rojo-linux
path: target/release/rojo

View File

@@ -1,6 +1,43 @@
# Rojo Changelog
## Unreleased Changes
* Updated reflection database and other dependencies.
## [0.5.4](https://github.com/rojo-rbx/rojo/releases/tag/v0.5.4) (February 26, 2020)
This is a general maintenance release for the Rojo 0.5.x release series.
* Updated reflection database and other dependencies.
* First stable release with binaries for macOS and Linux.
## [0.6.0 Alpha 1](https://github.com/rojo-rbx/rojo/releases/tag/v0.6.0-alpha.1) (January 22, 2020)
### General
* Added support for nested project files. ([#95](https://github.com/rojo-rbx/rojo/issues/95))
* Added project file hot-reloading. ([#10](https://github.com/rojo-rbx/rojo/issues/10)])
* Fixed Rojo dropping Ref properties ([#142](https://github.com/rojo-rbx/rojo/issues/142))
* This means that properties like `PrimaryPart` now work!
* Improved live sync protocol to reduce round-trips and improve syncing consistency.
* Improved support for binary model files and places.
### Command Line
* Added `--verbose`/`-v` flag, which can be specified multiple times to increase verbosity.
* Added support for automatically finding Roblox Studio's auth cookie for `rojo upload` on Windows.
* Added support for building, serving and uploading sources that aren't Rojo projects.
* Improved feedback from `rojo serve`.
* Removed support for legacy `roblox-project.json` projects, deprecated in an early Rojo 0.5.0 alpha.
* Rojo no longer traverses directories upwards looking for project files.
* Though undocumented, Rojo 0.5.x will search for a project file contained in any ancestor folders. This feature was removed to better support other 0.6.x features.
### Roblox Studio Plugin
* Added "connecting" state to improve experience when live syncing.
* Added "error" state to show errors in a place that isn't the output panel.
* Improved diagnostics for when the Rojo plugin cannot create an instance.
## [0.5.3](https://github.com/rojo-rbx/rojo/releases/tag/v0.5.3) (October 15, 2019)
* Fixed an issue where Rojo would throw an error when encountering recently-added instance classes.
## [0.5.2](https://github.com/rojo-rbx/rojo/releases/tag/v0.5.2) (October 14, 2019)
* Fixed an issue where `LocalizationTable` instances would have their column order randomized. ([#173](https://github.com/rojo-rbx/rojo/issues/173))
## [0.5.1](https://github.com/rojo-rbx/rojo/releases/tag/v0.5.1) (October 4, 2019)
* Fixed an issue where Rojo would drop changes if they happened too quickly ([#252](https://github.com/rojo-rbx/rojo/issues/252))

2133
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -116,10 +116,18 @@ Meta files can contain:
### Meta Files to set Rojo metadata
Sometimes it's useful to apply properties like `ignoreUnknownInstances` on instances that are defined on the filesystem instead of within the project itself.
If your project has `hello.txt` and there are instances underneath it that you want Rojo to ignore when live-syncing, you could create `hello.meta.json` with:
```json
{
"ignoreUnknownInstances": true
}
```
### Meta Files for Disabled Scripts
Meta files can be used to set properties on `Script` instances, like `Disabled`.
If your project had `foo.server.lua` and you wanted to make sure it would be disabled, you could create a `foo.meta.json` next to it with:
If your project has `foo.server.lua` and you want to make sure it would be disabled, you could create a `foo.meta.json` next to it with:
```json
{
@@ -140,7 +148,7 @@ If you wanted to represent a tool containing a script and a model for its handle
0, 0, 0,
1, 0, 0,
0, 1, 0,
0, 0, 1,
0, 0, 1
]
}
}

View File

@@ -1,6 +1,6 @@
return {
codename = "Epiphany",
version = {0, 5, 1},
version = {0, 5, 4},
expectedServerVersionString = "0.5.0 or newer",
protocolVersion = 2,
defaultHost = "localhost",

View File

@@ -0,0 +1,6 @@
{
"name": "init_meta_class_name",
"tree": {
"$path": "should-be-a-model"
}
}

View File

@@ -0,0 +1,3 @@
{
"className": "Model"
}

View File

@@ -0,0 +1,6 @@
{
"className": "Lighting",
"properties": {
"Technology": "Voxel"
}
}

View File

@@ -0,0 +1,6 @@
{
"name": "init_meta_properties",
"tree": {
"$path": "Lighting"
}
}

View File

@@ -0,0 +1,6 @@
{
"name": "script_meta_disabled",
"tree": {
"$path": "folder"
}
}

View File

@@ -0,0 +1,5 @@
{
"properties": {
"Disabled": true
}
}

View File

@@ -0,0 +1 @@
-- This script should be marked 'Disabled'

View File

@@ -1,8 +1,4 @@
use std::{
fs,
path::Path,
process::Command,
};
use std::{fs, path::Path, process::Command};
use insta::assert_snapshot_matches;
use tempfile::tempdir;
@@ -27,12 +23,15 @@ gen_build_tests! {
csv_bug_147,
csv_in_folder,
gitkeep,
init_meta_class_name,
init_meta_properties,
json_model_in_folder,
json_model_legacy_name,
module_in_folder,
module_init,
rbxm_in_folder,
rbxmx_in_folder,
script_meta_disabled,
server_in_folder,
server_init,
txt_in_folder,
@@ -55,7 +54,10 @@ fn run_build_test(test_name: &str) {
let status = Command::new(exe_path)
.args(&[
"build", input_path.to_str().unwrap(), "-o", output_path.to_str().unwrap(),
"build",
input_path.to_str().unwrap(),
"-o",
output_path.to_str().unwrap(),
])
.env("RUST_LOG", "error")
.current_dir(working_dir)
@@ -64,8 +66,7 @@ fn run_build_test(test_name: &str) {
assert!(status.success(), "Rojo did not exit successfully");
let contents = fs::read_to_string(&output_path)
.expect("Couldn't read output file");
let contents = fs::read_to_string(&output_path).expect("Couldn't read output file");
assert_snapshot_matches!(test_name, contents);
}
}

View File

@@ -0,0 +1,11 @@
---
source: rojo-test/src/build_test.rs
expression: contents
---
<roblox version="4">
<Item class="Model" referent="0">
<Properties>
<string name="Name">init_meta_class_name</string>
</Properties>
</Item>
</roblox>

View File

@@ -0,0 +1,12 @@
---
source: rojo-test/src/build_test.rs
expression: contents
---
<roblox version="4">
<Item class="Lighting" referent="0">
<Properties>
<string name="Name">init_meta_properties</string>
<token name="Technology">1</token>
</Properties>
</Item>
</roblox>

View File

@@ -1,6 +1,6 @@
---
created: "2019-08-10T07:45:07.961823500Z"
creator: insta@0.10.0
created: "2020-02-27T02:00:43.519025Z"
creator: insta@0.10.1
source: rojo-test/src/build_test.rs
expression: contents
---
@@ -27,12 +27,14 @@ expression: contents
<R22>1</R22>
</CoordinateFrame>
<Ref name="PrimaryPart">null</Ref>
<BinaryString name="Tags"><![CDATA[]]></BinaryString>
<BinaryString name="Tags">
</BinaryString>
</Properties>
<Item class="StringValue" referent="2">
<Properties>
<string name="Name">Cool StringValue</string>
<BinaryString name="Tags"><![CDATA[]]></BinaryString>
<BinaryString name="Tags">
</BinaryString>
<string name="Value">Did you know that BaseValue.Changed is different than Instance.Changed?</string>
</Properties>
</Item>

View File

@@ -0,0 +1,18 @@
---
source: rojo-test/src/build_test.rs
expression: contents
---
<roblox version="4">
<Item class="Folder" referent="0">
<Properties>
<string name="Name">script_meta_disabled</string>
</Properties>
<Item class="Script" referent="1">
<Properties>
<string name="Name">hello</string>
<bool name="Disabled">true</bool>
<string name="Source">-- This script should be marked 'Disabled'</string>
</Properties>
</Item>
</Item>
</roblox>

View File

@@ -1,6 +1,6 @@
[package]
name = "rojo"
version = "0.5.1"
version = "0.5.4"
authors = ["Lucien Greathouse <me@lpghatguy.com>"]
description = "Enables professional-grade development tools for Roblox developers"
license = "MIT"

View File

@@ -3,7 +3,7 @@
use std::{
borrow::Cow,
collections::HashMap,
collections::{BTreeMap, HashMap},
fmt,
path::{Path, PathBuf},
str,
@@ -631,7 +631,8 @@ fn snapshot_csv_file<'source>(
#[serde(skip_serializing_if = "Option::is_none")]
source: Option<&'a str>,
values: HashMap<&'a str, &'a str>,
// We use a BTreeMap here to get deterministic output order.
values: BTreeMap<&'a str, &'a str>,
}
let instance_name = file.path