mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-04-20 20:55:50 +00:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
78d97e162c | ||
|
|
5d0aa1193f | ||
|
|
126040a87b | ||
|
|
2c408f4047 | ||
|
|
b53cda787a |
@@ -2,6 +2,9 @@
|
||||
|
||||
## Unreleased Changes
|
||||
|
||||
## [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))
|
||||
* Improved diagnostics for when the Rojo plugin cannot create an instance.
|
||||
|
||||
4
Cargo.lock
generated
4
Cargo.lock
generated
@@ -1480,7 +1480,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "rojo"
|
||||
version = "0.5.1"
|
||||
version = "0.5.2"
|
||||
dependencies = [
|
||||
"clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"csv 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@@ -1515,7 +1515,7 @@ version = "0.1.0"
|
||||
dependencies = [
|
||||
"insta 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"paste 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rojo 0.5.1",
|
||||
"rojo 0.5.2",
|
||||
"tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
|
||||
@@ -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
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
return {
|
||||
codename = "Epiphany",
|
||||
version = {0, 5, 1},
|
||||
version = {0, 5, 2},
|
||||
expectedServerVersionString = "0.5.0 or newer",
|
||||
protocolVersion = 2,
|
||||
defaultHost = "localhost",
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"name": "init_meta_class_name",
|
||||
"tree": {
|
||||
"$path": "should-be-a-model"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"className": "Model"
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"className": "Lighting",
|
||||
"properties": {
|
||||
"Technology": "Voxel"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"name": "init_meta_properties",
|
||||
"tree": {
|
||||
"$path": "Lighting"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"name": "script_meta_disabled",
|
||||
"tree": {
|
||||
"$path": "folder"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"properties": {
|
||||
"Disabled": true
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
-- This script should be marked 'Disabled'
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "rojo"
|
||||
version = "0.5.1"
|
||||
version = "0.5.2"
|
||||
authors = ["Lucien Greathouse <me@lpghatguy.com>"]
|
||||
description = "Enables professional-grade development tools for Roblox developers"
|
||||
license = "MIT"
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user