- Added `ignoreHiddenServices: true` and a comprehensive list of `visibleServices` to multiple snapshot test files to improve service visibility management during testing.
- Refactored logging in the `diff.lua` file to streamline the trace output for hidden services, enhancing clarity in the sync process.
- Introduced a new CI pipeline documentation file outlining steps for auto-fixing formatting, running linters, building, and testing.
- Documented the Rojo syncback architecture, detailing improvements to prevent duplicate file creation and format mismatches.
- Updated syncback logic to ensure existing instances are updated instead of creating duplicates, enhancing project file management.
- Added tests for encoding instances and handling nested children to improve reliability in syncback operations.
- Updated the syncback loop to skip removal of nested project files, ensuring project structure is maintained.
- Added logging to indicate when nested project files are being skipped during the syncback process.
- Refactored the `SelectionOption` to be a Roact component that tracks hover state.
- Added logic to determine caret visibility based on node properties (parent-only, has children, and selection state).
- Updated background and text transparency based on hover state for improved UX.
- Adjusted event handling for mouse enter, mouse leave, and click actions to accommodate new behavior.
- Modified `SelectionRadio` to pass necessary props to `SelectionOption` for consistent behavior.
- Enhanced the `syncback` command to automatically download Roblox place files from the asset delivery API, allowing for zero-argument usage.
- Updated `Cargo.toml` to include compression features for `reqwest` and moved `tempfile` to dependencies.
- Introduced a new `download` argument in `SyncbackCommand` to specify place IDs for downloading.
- Implemented logic to resolve input file paths, prioritizing downloads when necessary.
- Added sourcemap generation after successful syncback and refreshed the git index if in a repository.
- Updated tests to validate the new download functionality and sourcemap creation.
- Introduced a new `SyncbackStats` module to track and report issues during syncback, including duplicate names, unknown classes, and properties.
- Updated the `syncback_loop` and related functions to utilize the stats tracker, logging summaries of issues encountered.
- Enhanced property filtering and instance syncing to record statistics on unknown classes and properties.
- Modified tests to ensure consistent output by normalizing temporary paths in snapshots.
- Added `regex` dependency for path normalization in tests.
- Added an `incremental` flag to the `SyncbackCommand` to allow for preserving existing file structure and middleware formats during syncback operations.
- Enhanced the `syncback_loop` function to differentiate between clean mode and incremental mode, ensuring orphaned files are removed only in clean mode.
- Updated logging to reflect the mode of operation during syncback.
- Introduced new tests to validate the behavior of clean mode versus incremental mode, ensuring proper handling of orphaned files and preservation of existing structures.
- Introduced a new CSV input file with translation data for Spanish.
- Updated the `init.csv` file to include a new entry for "Rojo" with its context and example.
- Enhanced the syncback logic to conditionally emit warnings for duplicate child names based on the new `warn_duplicate_names` configuration in `SyncbackRules`.
- Added documentation for the new warning behavior in the `SyncbackRules` and `SyncbackSnapshot` implementations.
- Changed various instances from Folder to ModuleScript in snapshot files to align with updated project structure.
- Added new ModuleScript instances with appropriate properties in multiple test snapshots, enhancing test coverage for module handling.
- Updated project names in syncback snapshots to ensure consistency with the new structure.
- Changed return statements in `init.client.lua` and `init.lua` files to reflect the new .luau extension.
- Updated README in `ignore_glob_spec` to specify that glob ignores now work with .spec.luau files instead of .spec.lua.
- Modified various test files to transition from .json to .json5 format, ensuring consistency across project configurations.
- Introduced new configuration files for testing, including `default.project.json5`, `client_in_folder`, and others.
- Updated existing project files to use JSON5 format, ensuring consistency across configurations.
- Added new Lua scripts and model files to support various test cases.
- Adjusted snapshot files to align with the new project structure and properties.
- Changed the default project file from `plugin.project.json` to `plugin.project.json5` in `build.rs`.
- Added new project configuration files in JSON5 format for various test cases, including `default.project.json5`, `client_in_folder`, `csv_bug_145`, and others.
- Updated snapshot files to reflect changes in instance structure and properties, ensuring consistency with the new project configurations.
- Removed unnecessary script and module instances from snapshot files to streamline the testing process.
- Updated the `ServeSession` to implement logic for pulling instances that exist in Studio but not in Rojo's filesystem, creating appropriate files during sync confirmation.
- Introduced a new `encodeInstance` function to serialize Studio instances for transmission, supporting all instance types.
- Modified the `PatchTree` to allow explicit user selection for push/pull/skip actions, enhancing user control during sync operations.
- Added tests for the new encoding functionality and updated existing tests to ensure proper behavior with the new syncback logic.
- Introduced `WatcherCriticalError` enum to categorize critical errors from the file watcher.
- Added a `CriticalErrorHandler` callback type for custom error handling in the watcher thread.
- Updated `StdBackend` to include a receiver for critical errors, allowing for better error management and logging.
- Refactored the watcher thread to handle errors gracefully instead of terminating the process, improving overall stability.
- Adjusted the layout of the reject button in ConfirmingPage for improved UI consistency.
- Updated multiple snapshot files to include the new syncSourceOnly flag, enhancing the server's sync capabilities in tests.
- Cleared out redundant attributes from various snapshot files, specifically removing `Rojo_Target_Value` and `Rojo_Target_PrimaryPart` where applicable.
- Ensured that attributes are consistently represented as empty objects when not needed, enhancing clarity in the snapshot structure.
- Adjusted related test cases to reflect these changes, ensuring alignment with the updated snapshot expectations.
Closes#858.
If a project is named `default.project.json`, it acts as an `init` file
and gains the name of the folder it's inside of. If it is named
something other than `default.project.json`, it gains the name of the
file with `.project.json` trimmed off. So e.g. `foo.project.json`
becomes `foo`.
Resolves#667
This PR:
- Introduces a new field in the project file: `scriptType` which has the
default value of `Class` (in parity with previous versions), but can
also be `RunContext`.
- This is then passed to `InstanceContext` from the `Project` struct.
- This then changes the RunContext in the lua `snapshot_middleware`
---------
Co-authored-by: Micah <dekkonot@rocketmail.com>
* Support implicit values for primitive attributes
This commit adds support for strings, numbers, and booleans to be implicitly typed in attribute maps, reducing the redundancy of needing to specify their types.
I also quietly adjusted one of the tests to use a more stable class/property pair. Since SourceAssetId is locked to Roblox, it could potentially disappear at any time.
* Apply formatting.
* Address feedback
* Backwards compatible format usage.
* Axe UnresolvedValueMap in favor of $attributes
Attributes can be defined directly on instances, with support for unambiguous types.
* Adjust test.
* to_string() -> into()
* Made attribute test more concise.
* small cleanup
* Update src/resolution.rs
* Update src/resolution.rs
* Update src/resolution.rs
* Update src/resolution.rs
Co-authored-by: Lucien Greathouse <me@lpghatguy.com>
* Add PathNode with optional fields to project. This allows a path to be defined either as `"$path": "src"` or `"$path": { "optional": "src" }`
* Make $path truly optional
* Prevent rojo from erroring if no project node is resolved
* Use match instead of if-statement
* Add end-to-end tests (credit to MobiusCraftFlip for initial scenario)
* Pass option with ref inside instead of reference to option
* Empty commit to restart GitHub Actions
* Simplify build test
* Minimize serve test: it fails
* Simplify serve test even more
* Ignore failing serve test
Co-authored-by: Lucien Greathouse <me@lpghatguy.com>
* Ignore empty/whitespace-only model.json files
* Ignore no return value from model.json files during snapshot
* Use str::from_utf8 instead of String::from_utf8
* Revert "Ignore no return value from model.json files during snapshot"
This reverts commit 0aef16e30a.
* Add test for empty .model.json files
* Change empty .model.json check method
Co-authored-by: Lucien Greathouse <me@lpghatguy.com>
* Format code with cargo fmt
* Use raw string instead
Co-authored-by: Lucien Greathouse <me@lpghatguy.com>
* Mostly mechanical port bits
* Almost there
* It builds again!
* Turn on all the code again
* Tests compiling but not passing
* Stub work for value resolution
* Implement resolution minus enums and derived properties
* Implement property descriptor resolution
* Update referent snapshots
* Update unions test project
Using a place file instead of a model yields better
error messages in Roblox Studio.
* Add easy shortcut to testing with local rbx-dom
* Update rbx-dom
* Add enum resolution
* Update init.meta.json to use UnresolvedValue
* Expand value resolution support, add test
* Filter SharedString values from web API
* Add 'property' builder method to InstanceSnapshot
* Change InstanceSnapshot/InstanceBuilder boundary
* Fix remove_file crash
* rustfmt
* Update to latest rbx_dom_lua
* Update dependencies, including rbx_dom_weak
* Update to latest rbx-dom
* Update dependencies
* Update rbx-dom, fixing more bugs
* Remove experimental warning on binary place builds
* Remove unused imports