diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 087f0615..180b752f 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -31,8 +31,7 @@ } } }, - "initializeCommand": "git submodule update --init --recursive", - "postCreateCommand": "rustc --version && cargo --version && git submodule update --init --recursive && cd editors/vscode-lsp && npm install && cd ../.. && ([ -d packages/diagram-core ] && cd packages/diagram-core && bun install || true) && ([ -d packages/diagram-ui ] && cd packages/diagram-ui && bun install || true)", + "initializeCommand": "git submodule deinit -f --all 2>/dev/null || true && git submodule update --init --recursive", "forwardPorts": [3000, 5173], "remoteUser": "vscode" -} +} \ No newline at end of file diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 0004a5f9..2a42c56f 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -18,18 +18,21 @@ Syster is a comprehensive Rust-based parser and tooling suite for SysML v2 (Syst - **LSP:** async-lsp library for Language Server Protocol - **Formatter:** Rowan-based Concrete Syntax Tree (CST) - **VS Code Extension:** TypeScript, Node.js -- **Build System:** Cargo workspace with 3 crates +- **Build System:** Independent submodules, each with own Cargo.toml/package.json ## Repository Structure ``` syster/ -├── crates/ -│ ├── syster-base/ # Core library (parser, AST, semantic analysis) -│ ├── syster-cli/ # Command-line tool -│ └── syster-lsp/ # Language Server Protocol implementation -├── editors/vscode/ # VS Code extension -├── docs/ # Documentation +├── base/ # syster-base: parser, AST, semantic analysis +├── cli/ # syster-cli: command-line tool +├── language-server/ # syster-lsp: Language Server Protocol implementation +├── language-client/ # VS Code LSP extension +├── modeller/ # VS Code modeller extension +├── viewer/ # VS Code viewer extension +├── diagram-core/ # TypeScript diagram utilities +├── diagram-ui/ # React diagram components +├── pipelines/ # CI/CD pipeline definitions └── .github/ # GitHub configuration and instructions ``` @@ -165,7 +168,7 @@ Before making changes, review: ## VS Code Extension -Located in `editors/vscode/`: +Located in `language-client/`: - TypeScript-based extension - Integrates with syster-lsp server - Provides syntax highlighting, IntelliSense, formatting, and more @@ -173,7 +176,7 @@ Located in `editors/vscode/`: ## Standard Library -The `crates/syster-base/sysml.library/` directory contains the SysML v2 standard library files. These are loaded automatically by the workspace when needed. +The `base/sysml.library/` directory contains the SysML v2 standard library files. These are loaded automatically by the workspace when needed. ## Getting Help diff --git a/.github/instructions/chore.md b/.github/instructions/chore.md deleted file mode 100644 index dbd977a7..00000000 --- a/.github/instructions/chore.md +++ /dev/null @@ -1,61 +0,0 @@ ---- -applyTo: '**/*.rs' ---- - -# Pre-Commit Checklist - -This checklist MUST be completed after every task/todo before committing changes. - -## Code Quality Checks - -- [ ] Remove unnecessary documentation from each changed file - - Delete redundant comments that don't add value - - Keep only essential API docs and complex logic explanations - -- [ ] Remove unused methods (unless marked with TODO prefix) - - Search for `#[allow(dead_code)]` warnings - - Delete or mark for future use with `// TODO: ...` - -- [ ] Move tests into their own test files - - Inline tests → `/tests.rs` - - Keep test modules focused and organized - -## Test Quality Checks - -- [ ] Add missing tests for each changed file - - Every public function should have at least one test - - Cover edge cases and error paths - -- [ ] Remove if-else match logic from tests - - Use `let-else` pattern: `let Some(x) = y else { panic!("...") };` - - Use `assert_matches!` macro where appropriate - -- [ ] Make tests more concrete - - Replace `assert!(x >= 5)` with `assert_eq!(x, 5)` - - Use exact values instead of ranges when possible - - Make assertions specific and meaningful - -## Final Checks - -- [ ] Address any TODOs added during the task - - Either implement them or file as future work - - Document why TODOs remain if not addressed - -- [ ] Clean up any temporary notes or debug code - - Remove `println!` debug statements - - Remove commented-out code blocks - - Clean up experimental code - -## Repeat Process - -Iterate through this checklist until no further changes are needed. - -## Validation - -After completing checklist: -```bash -cargo clippy --fix --allow-dirty -cargo test -git add -A && git commit -m "..." -``` - diff --git a/.github/instructions/configuration.md b/.github/instructions/configuration.md deleted file mode 100644 index d08794c4..00000000 --- a/.github/instructions/configuration.md +++ /dev/null @@ -1,378 +0,0 @@ ---- -applyTo: '**/{Cargo.toml,package.json,tsconfig.json,.gitignore,Makefile}' ---- - -# Configuration Files Guidelines - -## Overview - -This file provides guidance for working with configuration files in the Syster repository. These files define build settings, dependencies, linting rules, and project structure. - -## Cargo.toml Files - -### Workspace Root (Cargo.toml) - -The root `Cargo.toml` defines: -- Workspace members (all crates) -- Shared workspace package metadata -- Workspace-wide linter rules (clippy) -- Build optimization profiles - -**Key Principles:** -- Keep workspace metadata centralized -- Use consistent versioning across crates -- Define strict clippy rules for code quality -- Optimize profiles for development vs. production - -### Workspace Lints - -Current clippy rules enforce: -```toml -# Enforce explicit error handling -unwrap_used = "warn" # Avoid .unwrap() in production code -expect_used = "warn" # Avoid .expect() in production code -panic = "warn" # Avoid panic!() in production code -todo = "warn" # Mark incomplete code -unimplemented = "warn" # Mark unimplemented code - -# Code quality -dbg_macro = "warn" # Remove debug macros -print_stdout = "warn" # Avoid print to stdout -print_stderr = "warn" # Avoid print to stderr -missing_errors_doc = "warn" # Document error conditions -missing_panics_doc = "warn" # Document panic conditions - -# Performance -inefficient_to_string = "warn" -unnecessary_wraps = "warn" - -# Style consistency -enum_glob_use = "warn" -wildcard_imports = "warn" - -# Test quality -collapsible_if = "warn" -collapsible_else_if = "warn" -cognitive_complexity = "deny" # Keep functions simple - -# Deny by category (set explicit priority to avoid ambiguity) -correctness = { level = "deny", priority = -1 } # Critical errors -suspicious = { level = "deny", priority = -1 } -complexity = { level = "deny", priority = -1 } -perf = { level = "deny", priority = -1 } -``` - -**When adding new lints:** -- Justify why it improves code quality -- Test across the entire workspace -- Document in comments if non-obvious -- Use `warn` for style, `deny` for correctness - -### Build Profiles - -```toml -[profile.dev] # Fast compilation for development -[profile.test] # Test optimization -[profile.release] # Balanced for containers -[profile.production] # Maximum optimization (may fail in low memory) -``` - -**Don't modify profiles unless:** -- Compilation is too slow -- Runtime performance is problematic -- Memory constraints require changes - -### Per-Crate Cargo.toml - -Each crate (`syster-base`, `syster-cli`, `syster-lsp`) has its own `Cargo.toml`: - -```toml -[package] -name = "syster-base" -version.workspace = true # Use workspace version -edition.workspace = true # Use workspace edition - -[dependencies] -# Core dependencies -pest = "2.7" # Parser generator -# ... other deps - -[dev-dependencies] -# Test-only dependencies -rstest = "0.18" # Test fixtures -``` - -**Guidelines:** -- Use `workspace = true` for version, edition, authors, license -- Group dependencies logically (parser, semantic, LSP, etc.) -- Specify minimum required version -- Keep dev-dependencies separate -- Document non-obvious dependency choices - -## package.json (VS Code Extension) - -Located in `editors/vscode/package.json`, this defines: -- Extension metadata (name, version, description) -- VS Code engine compatibility -- Extension activation events -- Language definitions -- Configuration settings -- Commands and contributions - -**Key Sections:** - -### Extension Metadata -```json -{ - "name": "sysml-language-support", - "displayName": "SysML v2 Language Support", - "version": "0.1.0", - "engines": { - "vscode": "^1.85.0" // Minimum VS Code version - } -} -``` - -### Language Contributions -```json -{ - "contributes": { - "languages": [{ - "id": "sysml", - "extensions": [".sysml"], - "aliases": ["SysML", "sysml"] - }] - } -} -``` - -### Configuration Settings -```json -{ - "contributes": { - "configuration": { - "properties": { - "syster.stdlib.enabled": { - "type": "boolean", - "default": true, - "description": "Load SysML standard library on document open" - }, - "syster.stdlib.path": { - "type": "string", - "default": "", - "description": "Custom path to SysML standard library directory" - }, - "syster.lsp.path": { - "type": "string", - "default": "/workspaces/syster/target/release/syster-lsp", - "description": "Path to syster-lsp binary" - } - } - } - } -} -``` - -**When modifying package.json:** -- Validate JSON syntax -- Test activation events carefully (affects startup time) -- Keep settings prefixed with `sysml.` -- Provide clear descriptions for user-facing settings -- Update README.md if adding new features - -## tsconfig.json (TypeScript Configuration) - -Controls TypeScript compilation for the VS Code extension: - -```json -{ - "compilerOptions": { - "module": "commonjs", - "target": "ES2020", - "strict": true, - "outDir": "out" - } -} -``` - -**Guidelines:** -- Keep `strict: true` for type safety -- Don't lower target below ES2020 -- Use `outDir` for compiled output -- Enable source maps for debugging - -## Makefile - -Provides convenient commands for common tasks: - -```makefile -build: # Build the project -test: # Run tests -fmt: # Format code -lint: # Run clippy -run-guidelines: # Full validation pipeline -``` - -**Guidelines:** -- Keep targets simple and focused -- Use `.PHONY` for non-file targets -- Add helpful comments for each target -- Show progress for multi-step targets -- Don't duplicate functionality that's better in Cargo - -**When adding new targets:** -1. Choose a clear, descriptive name -2. Add to help text -3. Test that it works -4. Document any dependencies - -## .gitignore - -Controls which files Git tracks: - -**Current patterns:** -- `/target/` - Rust build artifacts -- `*.swp`, `*.swo` - Editor temporary files -- `Cargo.lock` in libraries (keep in binaries) -- `node_modules/` - npm dependencies -- `.DS_Store` - macOS files - -**When modifying:** -- Add patterns for new build tools -- Don't ignore files that should be committed -- Use comments to explain non-obvious patterns -- Test with `git status` to verify - -**Common additions:** -```gitignore -# IDE files -.vscode/settings.json # But keep .vscode/extensions.json -.idea/ - -# Build artifacts -/out/ -/dist/ -*.vsix - -# OS files -Thumbs.db -``` - -## Configuration Best Practices - -### Version Management -- Use workspace versioning for consistent releases -- Keep versions in sync across related crates -- Bump versions following semantic versioning: - - MAJOR: Breaking changes - - MINOR: New features, backward compatible - - PATCH: Bug fixes - -### Dependency Management -- Specify minimum required versions -- Avoid overly restrictive version constraints -- Keep dependencies up-to-date for security -- Review new dependencies carefully -- Document why non-obvious dependencies are needed - -### Testing Configuration Changes -Before committing configuration changes: -```bash -# Test Cargo changes -cargo check --workspace -cargo test --workspace -cargo clippy --workspace - -# Test package.json changes -cd editors/vscode -npm install -npm run compile - -# Test Makefile changes -make build -make test -make run-guidelines -``` - -### Common Pitfalls - -❌ **Don't:** -- Change profile settings without understanding impact -- Add dependencies without considering alternatives -- Modify linter rules to silence warnings (fix the code instead) -- Use wildcard version constraints (`*` or `>=x.0`) -- Add configuration options without documentation - -✅ **Do:** -- Test configuration changes thoroughly -- Document non-obvious settings -- Keep configurations minimal and focused -- Use workspace features to avoid duplication -- Follow established patterns in the codebase - -## File-Specific Guidelines - -### When to Edit Cargo.toml -- Adding or removing dependencies -- Updating dependency versions -- Changing build profile settings -- Adding new crate features -- Modifying metadata or lints - -### When to Edit package.json -- Adding new VS Code commands -- Adding configuration settings -- Updating extension metadata -- Changing activation events -- Adding language definitions - -### When to Edit Makefile -- Adding convenience commands -- Simplifying complex workflows -- Creating shortcuts for testing -- Adding validation pipelines -- Improving developer experience - -### When to Edit .gitignore -- New build tools generate artifacts -- IDE creates temporary files -- OS-specific files appear -- New dependency managers used -- Build output changes location - -## Validation - -After modifying configuration files: - -```bash -# Validate Cargo.toml syntax -cargo check - -# Validate package.json syntax -npm install --dry-run - -# Validate tsconfig.json -npx tsc --noEmit - -# Validate Makefile -make --dry-run - -# Verify .gitignore works -git status # Should show only tracked files -``` - -## Security Considerations - -- Never commit secrets or credentials -- Don't expose internal paths in public configs -- Be careful with git-ignored files (ensure secrets are ignored) -- Review dependencies for known vulnerabilities -- Keep dependencies up-to-date - -## Documentation - -When changing configuration files: -- Update README.md if user-facing features change -- Update CONTRIBUTING.md if developer workflow changes -- Document new configuration options -- Explain why changes were made in commit messages diff --git a/.github/instructions/copilot-instructions.md b/.github/instructions/copilot-instructions.md deleted file mode 100644 index 23e093f8..00000000 --- a/.github/instructions/copilot-instructions.md +++ /dev/null @@ -1,225 +0,0 @@ ---- -applyTo: '**/*.rs' ---- - -# Rust Development Instructions - -## Project-Specific Guidance - -### Architecture Understanding - READ FIRST - -Before making changes, familiarize yourself with the project architecture: - -- **[ARCHITECTURE.md](../../ARCHITECTURE.md)** - System design, three-phase pipeline, design decisions -- **[docs/CONTRIBUTING.md](../../docs/CONTRIBUTING.md)** - Development workflow, code conventions -- **[docs/SYSML_PRIMER.md](../../docs/SYSML_PRIMER.md)** - SysML v2 and KerML concepts - -### Key Project Patterns - -1. **Three-Phase Pipeline**: Parse (Pest) → Syntax (AST) → Semantic (Symbols + Graphs) - - **Never mix phases**: Don't add semantic logic to parser, don't parse in semantic analyzer - - Each phase has clear inputs and outputs (see ARCHITECTURE.md) - -2. **Symbol Table is Global**: AST nodes don't contain resolved references - - Symbols are stored in centralized `SymbolTable` - - Use qualified names (`QualifiedName`) for cross-file references - - Don't add back-references to AST nodes - -3. **Relationship Graphs**: Use separate graphs for relationships - - Don't store specialization/typing in Symbol enum - - Use `RelationshipGraph` methods for queries - - Graph operations are in `src/semantic/graph.rs` - -4. **Import Resolution**: Three-pass algorithm (see SEMANTIC_ANALYSIS.md) - - Pass 1: Namespace imports (`Package::*`) - - Pass 2: Member imports (`Package::Member`) - - Pass 3: Recursive imports (`Package::*::**`) - - Don't try to resolve imports in a single pass - -5. **Type Aliases**: Use documented type aliases for clarity - - `QualifiedName` for fully qualified names - - `SimpleName` for unqualified names - - `ScopeId` for scope identifiers - - `SourceFilePath` for file paths - -### Adding New Features - -**Adding a new SysML element type** (e.g., `concern def`): -1. Update grammar: `src/parser/sysml.pest` -2. Define AST struct: `src/language/sysml/syntax/types.rs` -3. Add to parent enum: `src/language/sysml/syntax/enums.rs` -4. Update populator: `src/language/sysml/populator.rs` -5. Add tests: `tests/semantic/sysml_parsing_tests.rs` - -**Adding a new semantic check**: -1. Add error kind: `src/semantic/error.rs` -2. Implement check: `src/semantic/analyzer.rs` -3. Call from `analyze()` method -4. Add tests: `tests/semantic/mod.rs` - -See ARCHITECTURE.md "Common Operations Guide" for detailed examples. - -### Module Organization - -``` -src/ -├── parser/ # Pest grammar files (kerml.pest, sysml.pest) -├── language/ # Language-specific AST and populators -│ ├── kerml/ # KerML foundation language -│ └── sysml/ # SysML v2 systems language -├── semantic/ # Semantic analysis (YOU ARE HERE most of the time) -│ ├── symbol_table.rs # Global symbol registry -│ ├── graph.rs # Relationship graphs -│ ├── resolver.rs # Name resolution -│ ├── analyzer.rs # Validation passes -│ └── workspace.rs # Multi-file coordination -└── project/ # Workspace loading (stdlib, user projects) -``` - -### Common Pitfalls - -❌ **Don't**: Add semantic logic to AST nodes -✅ **Do**: Keep AST immutable, use SymbolTable for semantic info - -❌ **Don't**: Resolve imports while building symbol table -✅ **Do**: Build symbol table first, then run three-pass import resolution - -❌ **Don't**: Store relationships in Symbol enum -✅ **Do**: Use RelationshipGraph for all relationships - -❌ **Don't**: Create circular dependencies between modules -✅ **Do**: Follow dependency flow: parser → language → semantic - -### Terminology (SysML/KerML Specific) - -- **Qualified Name**: Full path like `Package::Class::Feature` -- **Classifier**: KerML type that can have features (class, struct, etc.) -- **Definition**: SysML type (part def, port def, action def, etc.) -- **Usage**: SysML instance (part, port, action, etc.) -- **Feature**: Property or operation of a classifier -- **Specialization**: IS-A relationship (inheritance) -- **Typing**: INSTANCE-OF relationship -- **Subsetting**: REFINES relationship -- **Redefinition**: OVERRIDES relationship - -See SYSML_PRIMER.md for full glossary. - -## Test-Driven Development (TDD) - MANDATORY - -1. **Always write tests first** before implementing functionality - - Write a failing test that describes the desired behavior - - Run the test to confirm it fails for the right reason - - Implement the minimal code to make the test pass - - Refactor if needed while keeping tests green - -2. **Test execution is required** - - After writing a test, you MUST run it using `runTests` tool or `cargo test` - - Never proceed to implementation without seeing the test fail first - - Never claim completion without running tests to verify success - -## Incremental Development - STRICT LIMITS - -1. **One function at a time** - - Edit only ONE function per change cycle - - Complete the full TDD cycle (test → implement → verify) for that function - - Do not move to the next function until current one is complete and tested - -2. **Small, focused changes** - - Each change should be minimal and focused - - If a change requires modifying multiple functions, STOP and break it down - - Prefer multiple small commits over one large change - -3. **Restart trigger** - - If you find yourself making changes across multiple files simultaneously, STOP - - If you're modifying more than ~10-15 lines in a single function, STOP and reconsider - - If the scope is growing beyond the original small task, STOP and restart with a smaller goal - - Ask the user to break down the task into smaller pieces if needed - -## Rust Best Practices - -1. **Error handling** - - Use `Result` for fallible operations - - Use `Option` for values that may or may not exist - - Avoid `.unwrap()` and `.expect()` in production code (tests are okay) - - Propagate errors with `?` operator when appropriate - -2. **Ownership and borrowing** - - Prefer borrowing (`&T`, `&mut T`) over transferring ownership - - Use `.clone()` judiciously - only when necessary - - Leverage the borrow checker to ensure memory safety - -3. **Idiomatic Rust** - - Use iterator methods (`.map()`, `.filter()`, `.collect()`) over explicit loops when clearer - - Prefer pattern matching over if-let chains - - Use `derive` macros for common traits (Debug, Clone, PartialEq, etc.) - - Follow Rust naming conventions (snake_case for functions/variables, CamelCase for types) - -4. **Code organization** - - Keep modules focused and cohesive - - Use `mod.rs` or module files appropriately - - Make items private by default, expose only what's needed - - Document public APIs with doc comments (`///`) - -## Workflow Checklist - -Before each change: -- [ ] Have I identified ONE specific function to modify? -- [ ] Have I written a test for this change? -- [ ] Is this change small enough (< 15 lines in the function)? - -After each change: -- [ ] Did I run the tests? -- [ ] Did the tests pass? -- [ ] Is the code formatted with `cargo fmt`? -- [ ] Does `cargo clippy` pass without warnings? - -If you answer "no" to any of these, STOP and address it before proceeding. - -## Task Completion Workflow - MANDATORY - -After completing EACH todo/task, you MUST: - -1. **Complete the pre-commit checklist** (see `.github/instructions/chore.md`): - - Remove unnecessary documentation from each changed file - - Remove unused methods that don't have a TODO prefix - - Move tests into their own files if that hasn't been done - - Go through each changed file and add any missing tests - - Remove if-else match logic from tests - - Make tests more concrete (clear equals values rather than >=/<= comparisons) - - Address any TODOs added during the task - - Clean up any temporary notes - -2. **Run validation**: `make run-guidelines` or `cargo clippy && cargo test` - -3. **Commit changes**: `git add -A && git commit` with descriptive message - -**This is mandatory after every todo completion.** Do not skip these steps. - -Example commit message format: -``` -feat(component): brief description of what was done - -- Detail 1 -- Detail 2 -- Tests: X passing -``` - -## Development Commands - -- `cargo test` - Run all tests -- `cargo test ` - Run specific test -- `cargo fmt` - Format code -- `cargo clippy` - Run linter -- `cargo build` - Build project -- `cargo run` - Run the application - -## Red Flags - When to STOP - -⛔ You're editing multiple functions simultaneously -⛔ You're making changes across multiple modules at once -⛔ The diff is growing beyond 20-30 lines -⛔ You haven't run tests in the last change cycle -⛔ You're implementing before writing tests -⛔ You're unsure how to test the change - -**When you see these flags, pause and restart with a smaller scope.** diff --git a/.github/instructions/documentation.md b/.github/instructions/documentation.md deleted file mode 100644 index 59dd9ccf..00000000 --- a/.github/instructions/documentation.md +++ /dev/null @@ -1,420 +0,0 @@ ---- -applyTo: '**/*.md' ---- - -# Documentation Guidelines - -## Documentation Philosophy - -Documentation in Syster should be: -- **Clear and concise** - Get to the point quickly -- **Up-to-date** - Keep in sync with code changes -- **Actionable** - Provide concrete examples and commands -- **Well-organized** - Use consistent structure and hierarchy - -## Key Documentation Files - -### Repository Root -- **README.md** - Project overview, features, quick start, usage examples -- **ARCHITECTURE.md** - System design, core patterns, critical rules, common operations -- **LICENSE.md** - MIT license information - -### docs/ Directory -- **CONTRIBUTING.md** - Development workflow, TDD guidelines, code conventions -- **SYSML_PRIMER.md** - SysML v2 and KerML concepts for developers new to the domain -- **FUTURE_WORK.md** - Planned features and improvements - -### .github/ -- **copilot-instructions.md** - Repository-wide Copilot guidance -- **instructions/*.md** - Path-specific Copilot instructions - -### Per-Crate Documentation -- **crates/syster-base/README.md** - Core library documentation -- **crates/syster-cli/README.md** - CLI tool documentation -- **crates/syster-lsp/README.md** - LSP server documentation -- **editors/vscode/README.md** - VS Code extension documentation - -## Documentation Structure - -### For Feature Documentation - -Use this structure: -1. **Overview** - What is this feature? -2. **Purpose** - Why does it exist? -3. **Usage** - How to use it (with examples) -4. **Configuration** - Available options and settings -5. **Examples** - Real-world usage patterns -6. **Troubleshooting** - Common issues and solutions - -### For Architecture Documentation - -Use this structure: -1. **High-level overview** - System architecture diagram or description -2. **Key components** - Major modules and their responsibilities -3. **Data flow** - How information moves through the system -4. **Design decisions** - Why things are structured this way -5. **Constraints** - Important rules and invariants -6. **Common operations** - How to accomplish typical tasks - -### For Contributing Documentation - -Use this structure: -1. **Getting started** - Setup and prerequisites -2. **Development workflow** - How to develop features -3. **Testing guidelines** - How to write and run tests -4. **Code conventions** - Style and patterns to follow -5. **Pull request process** - How to submit changes -6. **Review checklist** - What reviewers look for - -## Markdown Style Guide - -### Headers -```markdown -# Top-level heading (only one per document) - -## Section heading - -### Subsection heading - -#### Minor section (use sparingly) -``` - -### Code Blocks -Always specify the language for syntax highlighting: - -````markdown -```rust -pub fn example() -> Result<(), Error> { - // Code here -} -``` - -```bash -cargo build -cargo test -``` -```` - -### Links -- Use descriptive link text: `[ARCHITECTURE.md](ARCHITECTURE.md)` -- Not: `[click here](ARCHITECTURE.md)` -- Prefer relative links within the repository -- Use absolute links for external resources - -### Lists -```markdown -- Unordered lists use dashes -- Keep items parallel in structure -- Use bullet points for related items - -1. Ordered lists use numbers -2. Use for sequential steps -3. Keep numbering consistent -``` - -### Emphasis -- Use **bold** for important terms and commands -- Use *italics* for emphasis -- Use `code formatting` for: - - File names and paths - - Commands and CLI arguments - - Function and variable names - - Code snippets inline - -### Tables -```markdown -| Feature | Status | Notes | -|---------|--------|-------| -| Parsing | ✅ Complete | Full grammar support | -| LSP | ✅ Complete | All major features | -``` - -### Admonitions -Use consistent symbols for different message types: - -```markdown -✅ **Good:** This is a good practice - -❌ **Don't:** This is a bad practice - -⚠️ **Warning:** This is important to know - -💡 **Tip:** This is a helpful suggestion - -📝 **Note:** This is additional information -``` - -## Documentation Updates - -### When to Update Documentation - -**Always update docs when:** -- Adding a new feature or API -- Changing existing behavior -- Adding new configuration options -- Modifying build or test commands -- Changing architecture or design patterns -- Fixing bugs that users might encounter - -**Where to update:** -- **README.md** - For user-facing changes -- **ARCHITECTURE.md** - For design pattern changes -- **CONTRIBUTING.md** - For workflow changes -- **Doc comments** - For API changes -- **Changelog** - For all notable changes - -### Documentation Review Checklist - -Before committing documentation changes: -- [ ] Spell check completed -- [ ] Grammar checked -- [ ] Links tested (especially relative links) -- [ ] Code examples tested and working -- [ ] Consistent with existing style -- [ ] No broken markdown formatting -- [ ] Clear and concise -- [ ] Actionable with concrete examples - -## Rust Doc Comments - -### Module Documentation -```rust -//! # Module Name -//! -//! Brief description of the module's purpose. -//! -//! ## Overview -//! More detailed explanation... -//! -//! ## Examples -//! ``` -//! use syster::module::Function; -//! -//! let result = Function::new(); -//! ``` -``` - -### Function Documentation -```rust -/// Resolves a qualified name to its symbol definition. -/// -/// # Arguments -/// -/// * `qualified_name` - Fully qualified name like "Package::Element" -/// -/// # Returns -/// -/// The symbol if found, or `None` if not found. -/// -/// # Examples -/// -/// ``` -/// let symbol = resolver.resolve_qualified("MyPackage::MyClass"); -/// ``` -/// -/// # Errors -/// -/// Returns `SemanticError::UndefinedSymbol` if the name cannot be resolved. -pub fn resolve_qualified(&self, name: &str) -> Result<&Symbol, SemanticError> { - // Implementation -} -``` - -### What to Document -✅ **Do document:** -- Public APIs (functions, structs, enums) -- Complex algorithms or non-obvious logic -- Error conditions and edge cases -- Invariants and preconditions -- Examples for non-trivial usage - -❌ **Don't document:** -- Self-explanatory code -- Trivial getters/setters -- Private implementation details (unless complex) -- Test functions (unless testing pattern is complex) - -## Examples and Code Snippets - -### In README.md -- Show the most common use cases first -- Include complete, runnable examples -- Show both simple and advanced usage -- Include output or expected results - -### In ARCHITECTURE.md -- Use pseudocode for abstract concepts -- Use actual code for concrete implementations -- Include before/after examples for design patterns -- Show both good and bad examples - -### In CONTRIBUTING.md -- Show complete workflows, not just fragments -- Include all necessary commands -- Explain why, not just how -- Provide troubleshooting steps - -## Keeping Documentation Current - -### During Development -- Update docs as you write code, not after -- Make doc updates part of your PR -- Update examples when APIs change -- Run `cargo doc` to check doc comments - -### During Code Review -- Review doc changes as carefully as code changes -- Ensure examples compile and work -- Check that changes are reflected in all relevant docs -- Verify links and references are correct - -### Periodic Audits -- Review documentation quarterly -- Remove outdated information -- Update examples with current best practices -- Consolidate or reorganize as needed - -## Special Documentation Types - -### API Documentation -- Generated from Rust doc comments -- Run `cargo doc --open` to view -- Should include examples and error conditions -- Links to related functions and types - -### Tutorial Documentation -- Step-by-step guides -- Start simple, gradually increase complexity -- Include complete working examples -- Explain concepts before showing code - -### Reference Documentation -- Comprehensive coverage of all features -- Organized by category or module -- Include all options and parameters -- Link to examples and tutorials - -## Documentation Tools - -### Checking Documentation -```bash -# Build and check Rust docs -cargo doc --no-deps --document-private-items - -# Check for broken links in Rust docs -cargo doc --no-deps - -# Spell check (if installed) -typos - -# Markdown linting (if installed) -markdownlint **/*.md -``` - -### Generating Documentation -```bash -# Generate and open Rust API docs -cargo doc --open - -# Generate docs for all crates -cargo doc --workspace -``` - -## Writing Style - -### Voice and Tone -- Use active voice: "The parser generates..." not "The AST is generated by..." -- Be direct and concise -- Use present tense: "The function returns..." not "The function will return..." -- Be friendly but professional - -### Technical Accuracy -- Be precise with terminology -- Use consistent names for concepts -- Define domain-specific terms -- Link to definitions when introducing terms - -### Audience Awareness -- **README.md** - Assumes basic knowledge, shows what's possible -- **CONTRIBUTING.md** - Assumes developer familiarity with Rust -- **ARCHITECTURE.md** - Assumes developer working on the codebase -- **SYSML_PRIMER.md** - Assumes no SysML knowledge - -## Common Documentation Pitfalls - -❌ **Don't:** -- Let documentation get out of sync with code -- Use vague language like "usually" or "might" -- Assume readers know internal terminology -- Skip examples for complex features -- Leave broken links or outdated screenshots -- Write documentation after the code is done - -✅ **Do:** -- Update docs with every code change -- Be specific and concrete -- Define terms when first used -- Provide multiple examples for different scenarios -- Test all links and examples -- Write docs alongside code - -## Templates - -### New Feature Documentation Template -```markdown -## Feature Name - -### Overview -Brief description of what the feature does. - -### Usage -Basic usage example with code. - -### Configuration -Available settings and their defaults. - -### Examples -#### Example 1: Basic Usage -Code and explanation. - -#### Example 2: Advanced Usage -Code and explanation. - -### Troubleshooting -Common issues and solutions. -``` - -### API Reference Template -```rust -/// Brief one-line description. -/// -/// More detailed explanation of what this does, -/// including any important behavior or edge cases. -/// -/// # Arguments -/// -/// * `param1` - Description of first parameter -/// * `param2` - Description of second parameter -/// -/// # Returns -/// -/// Description of return value. -/// -/// # Examples -/// -/// ``` -/// // Example usage -/// let result = function(arg1, arg2); -/// ``` -/// -/// # Errors -/// -/// Description of error conditions. -/// -/// # Panics -/// -/// Description of panic conditions (if any). -pub fn function(param1: Type1, param2: Type2) -> ReturnType { - // Implementation -} -``` diff --git a/.github/instructions/refactor-lsp.md b/.github/instructions/refactor-lsp.md deleted file mode 100644 index f0da8fa9..00000000 --- a/.github/instructions/refactor-lsp.md +++ /dev/null @@ -1,183 +0,0 @@ ---- -applyTo: 'crates/syster-lsp/**/*.rs' ---- - -# LSP Backend Refactoring TODO - -## Goal -Refactor `backend.rs` (590 lines) into clean, modular structure following rust-analyzer pattern. -Target: ~100 line backend.rs, separate feature modules. - ---- - -## Phase 1: Move utilities to core (syster-base) - -### 1.1 Create text utilities module ✅ COMPLETE -- [x] Create `crates/syster-base/src/core/text_utils.rs` -- [x] Move `extract_word_at_cursor()` from backend.rs -- [x] Add helper: `is_word_character()` -- [x] Add helper: `find_word_boundaries()` -- [x] Export from `crates/syster-base/src/core/mod.rs` -- [x] Update backend.rs to use `syster::core::text_utils::extract_word_at_cursor` -- [x] Run tests: `cargo test` -- [x] BONUS: Integrated unicode-ident for proper Unicode identifier support -- [x] All 1866 tests passing - -### 1.2 Create text search module -- [x] ~~Create `crates/syster-base/src/core/text_search.rs`~~ **SKIPPED** -- [x] ~~Move `find_text_references()` logic (without LSP types)~~ **SKIPPED** -- [x] ~~Define `TextMatch { line: usize, col: usize, length: usize }`~~ **SKIPPED** -- [x] ~~Function: `find_text_occurrences(text: &str, search: &str) -> Vec`~~ **SKIPPED** -- [x] ~~Export from `crates/syster-base/src/core/mod.rs`~~ **SKIPPED** -- [x] ~~Update backend.rs to use core text search + convert to LSP Location~~ **SKIPPED** -- [x] ~~Run tests: `cargo test`~~ **SKIPPED** - -**Decision**: Keep text search in backend.rs as-is. LSP features only work on valid syntax. -This is simpler and more accurate. Can revisit if error-resilient parsing is needed later. - ---- - -## Phase 2: Move AST utilities to language module - -### 2.1 Create syntax query module -- [ ] Create `crates/syster-base/src/language/sysml/syntax/query.rs` -- [ ] Move `find_element_at_position()` from backend.rs -- [ ] Make it return `Option<(String, Span)>` (remove LSP dependency) -- [ ] Export from `crates/syster-base/src/language/sysml/syntax/mod.rs` -- [ ] Update backend.rs to use `syster::language::sysml::syntax::query::find_element_at_position` -- [ ] Run tests: `cargo test` - ---- - -## Phase 3: Create LSP feature modules (within syster-lsp) - -### 3.1 Create conversions module -- [ ] Create `crates/syster-lsp/src/conversions.rs` -- [ ] Move `span_to_lsp_range()` from backend.rs -- [ ] Add `lsp_position_to_core()` helper -- [ ] Add `text_match_to_location()` helper -- [ ] Export from `crates/syster-lsp/src/lib.rs` (if exists) or main.rs - -### 3.2 Create hover feature module -- [ ] Create `crates/syster-lsp/src/features/mod.rs` -- [ ] Create `crates/syster-lsp/src/features/hover.rs` -- [ ] Move from backend.rs: - - `format_rich_hover()` - - `format_symbol_declaration()` - - `get_symbol_relationships()` -- [ ] Function: `get_hover_info(workspace, file_path, position, document_texts) -> Option` -- [ ] Run tests: `cargo test` - -### 3.3 Create navigation feature module -- [ ] Create `crates/syster-lsp/src/features/navigation.rs` -- [ ] Extract from `get_definition()`: - - Function: `find_symbol_definition(workspace, file_path, position, document_texts) -> Option<(PathBuf, Span)>` -- [ ] Extract from `get_references()`: - - Function: `find_symbol_references(workspace, symbol_name, document_texts, include_declaration) -> Vec<(PathBuf, usize, usize)>` -- [ ] Run tests: `cargo test` - -### 3.4 Create search feature module -- [ ] Create `crates/syster-lsp/src/features/search.rs` -- [ ] Function: `find_symbol_at_position(workspace, file_path, position) -> Option<(String, Span)>` -- [ ] Function: `lookup_symbol_with_fallback(workspace, name) -> Option<&Symbol>` -- [ ] Run tests: `cargo test` - ---- - -## Phase 4: Create LSP handlers (protocol layer) - -### 4.1 Create handlers module structure -- [ ] Create `crates/syster-lsp/src/handlers/mod.rs` -- [ ] Create `crates/syster-lsp/src/handlers/hover.rs` -- [ ] Create `crates/syster-lsp/src/handlers/definition.rs` -- [ ] Create `crates/syster-lsp/src/handlers/references.rs` - -### 4.2 Implement hover handler -- [ ] Move hover LSP logic from `backend.get_hover()` to `handlers/hover.rs` -- [ ] Function: `handle_hover(backend: &Backend, uri: &Url, position: Position) -> Option` -- [ ] Use `features::hover::get_hover_info()` + `conversions::span_to_lsp_range()` -- [ ] Update `main.rs` to call handler -- [ ] Run tests: `cargo test` - -### 4.3 Implement definition handler -- [ ] Move definition LSP logic from `backend.get_definition()` to `handlers/definition.rs` -- [ ] Function: `handle_goto_definition(backend: &Backend, uri: &Url, position: Position) -> Option` -- [ ] Use `features::navigation::find_symbol_definition()` + conversions -- [ ] Update `main.rs` to call handler -- [ ] Run tests: `cargo test` - -### 4.4 Implement references handler -- [ ] Move references LSP logic from `backend.get_references()` to `handlers/references.rs` -- [ ] Function: `handle_references(backend: &Backend, uri: &Url, position: Position, include_decl: bool) -> Option>` -- [ ] Use `features::navigation::find_symbol_references()` + conversions -- [ ] Update `main.rs` to call handler -- [ ] Run tests: `cargo test` - ---- - -## Phase 5: Simplify Backend - -### 5.1 Clean up backend.rs -- [ ] Remove all moved functions -- [ ] Keep only: - - `struct Backend` with state (workspace, parse_errors, document_texts) - - `new()` - - `workspace()` accessor - - `parse_and_update()` - - `open_document()`, `change_document()`, `close_document()` - - `get_diagnostics()` -- [ ] Target: ~100 lines -- [ ] Run tests: `cargo test` - -### 5.2 Update main.rs -- [ ] Import handlers: `use handlers::{hover, definition, references}` -- [ ] Update `hover()` to call `hover::handle_hover()` -- [ ] Update `goto_definition()` to call `definition::handle_goto_definition()` -- [ ] Update `references()` to call `references::handle_references()` -- [ ] Run tests: `cargo test` - ---- - -## Phase 6: Final cleanup - -### 6.1 Update tests -- [ ] Move tests from `backend/tests.rs` to appropriate feature test files: - - `features/hover/tests.rs` - - `features/navigation/tests.rs` - - `features/search/tests.rs` -- [ ] Keep integration-style tests in `backend/tests.rs` -- [ ] Run all tests: `cargo test` - -### 6.2 Documentation -- [ ] Add module-level docs to each new module -- [ ] Update ARCHITECTURE.md with new structure -- [ ] Run `cargo doc` to verify - -### 6.3 Final validation -- [ ] Run `cargo clippy` -- [ ] Run `cargo fmt` -- [ ] Run full test suite: `cargo test` -- [ ] Verify line counts: - - `backend.rs`: ~100 lines - - Total LSP crate: more organized, similar total lines -- [ ] Commit: "refactor: Restructure LSP into modular architecture" - ---- - -## Success Criteria - -- [x] All tests passing -- [x] No clippy warnings -- [x] `backend.rs` < 150 lines -- [x] Clear separation: core utils / language utils / LSP features / LSP protocol -- [x] Each module has focused responsibility -- [x] IDE features can be tested without LSP protocol - ---- - -## Notes - -- Work incrementally - test after each phase -- Keep all tests passing throughout -- Each phase should be a separate commit -- Follow the chore.md checklist after each phase diff --git a/.github/instructions/vscode-extension.md b/.github/instructions/vscode-extension.md deleted file mode 100644 index fa13c72b..00000000 --- a/.github/instructions/vscode-extension.md +++ /dev/null @@ -1,227 +0,0 @@ ---- -applyTo: 'editors/vscode/**/*.{ts,js,json}' ---- - -# VS Code Extension Development Instructions - -## Extension Overview - -The Syster VS Code extension provides IDE integration for SysML v2 and KerML languages. It communicates with the syster-lsp Language Server Protocol implementation to provide rich editing features. - -## Technology Stack - -- **Language:** TypeScript -- **Build System:** npm, tsc (TypeScript compiler) -- **Extension API:** VS Code Extension API -- **LSP Client:** vscode-languageclient package -- **Packaging:** vsce (Visual Studio Code Extension Manager) - -## Project Structure - -``` -editors/vscode/ -├── client/ -│ └── src/ -│ ├── extension.ts # Main extension entry point -│ ├── client.ts # LSP client setup -│ └── server-locator.ts # Server path detection -├── package.json # Extension manifest and configuration -├── tsconfig.json # TypeScript configuration -└── README.md # Extension documentation -``` - -## Development Guidelines - -### VS Code Extension Best Practices - -1. **Activation Events** - - Use precise activation events to minimize extension load time - - Current activation: on SysML/KerML file opening - - Don't activate on VS Code startup unless absolutely necessary - -2. **Configuration** - - All user-facing settings should be in `package.json` under `contributes.configuration` - - Use clear setting names with the `sysml.` prefix - - Provide sensible defaults - - Document each setting clearly - -3. **Language Server Integration** - - Use `vscode-languageclient` for LSP communication - - Handle server crashes and restarts gracefully - - Provide user feedback for server status - - Support custom server path configuration for development - -4. **Error Handling** - - Catch and log all errors appropriately - - Show user-friendly error messages for critical failures - - Don't crash the extension on recoverable errors - - Use VS Code's output channel for detailed logs - -### TypeScript Guidelines - -```typescript -// ✅ Good: Use async/await for asynchronous operations -async function startServer(): Promise { - try { - await client.start(); - } catch (error) { - vscode.window.showErrorMessage(`Failed to start LSP: ${error}`); - } -} - -// ✅ Good: Use proper TypeScript types -interface ServerConfig { - stdlibEnabled: boolean; - stdlibPath: string | undefined; -} - -// ✅ Good: Use VS Code API properly -const config = vscode.workspace.getConfiguration('syster'); -const enabled = config.get('stdlib.enabled', true); - -// ❌ Bad: Don't use 'any' type -const config: any = vscode.workspace.getConfiguration(); // Don't do this - -// ❌ Bad: Don't ignore errors silently -client.start().catch(() => {}); // Don't do this -``` - -### Extension Configuration - -Current extension settings (in `package.json`): -- `syster.stdlib.enabled` - Enable/disable standard library loading -- `syster.stdlib.path` - Custom path to standard library files -- `syster.lsp.path` - Custom path to syster-lsp server binary -- `syster.lsp.trace.server` - Trace LSP communication for debugging - -### Testing the Extension - -```bash -# Install dependencies -cd editors/vscode -npm install - -# Compile TypeScript -npm run compile - -# Watch mode for development -npm run watch - -# Package the extension -npm run package -``` - -To test locally: -1. Open the `editors/vscode` folder in VS Code -2. Press F5 to launch Extension Development Host -3. Open a `.sysml` or `.kerml` file to activate the extension -4. Check "Output" panel → "Syster LSP" for logs - -### Build & Deployment - -```bash -# Compile TypeScript -npm run compile - -# Package extension (.vsix file) -npm run package - -# Install locally for testing -code --install-extension syster-*.vsix -``` - -### Code Organization - -- **client/src/extension.ts** - Main entry point with `activate()` and `deactivate()` -- **client/src/client.ts** - LSP client setup and configuration -- **client/src/server-locator.ts** - Server binary path detection -- Keep extension logic simple - delegate to LSP server -- Configuration management should be centralized -- Use VS Code's workspace configuration API - -### Common Tasks - -**Adding a new configuration setting:** -1. Add to `contributes.configuration` in `package.json` with `syster.` prefix -2. Document with clear description and default value -3. Read in extension code using `vscode.workspace.getConfiguration('syster')` -4. Pass to LSP server if needed via initialization options - -**Adding a new command:** -1. Define in `contributes.commands` in `package.json` -2. Register in `extension.ts` with `vscode.commands.registerCommand()` -3. Add to activation events if needed - -**Updating LSP client:** -1. Modify initialization options in `extension.ts` -2. Ensure server supports the new options -3. Test communication between client and server - -### Debugging - -Enable detailed logs: -```typescript -// In extension.ts, add to client options: -const clientOptions: LanguageClientOptions = { - outputChannel: window.createOutputChannel('Syster LSP'), - traceOutputChannel: window.createOutputChannel('Syster LSP Trace'), -}; -``` - -Check logs in: -- Output panel → "Syster LSP" (general logs) -- Output panel → "Syster LSP Trace" (detailed protocol trace) - -### Performance Considerations - -- Minimize synchronous operations in activation -- Use lazy initialization where possible -- Avoid blocking the main extension thread -- Let the LSP server handle expensive computations - -### Security - -- Don't bundle sensitive data or credentials -- Validate all user-provided paths before using -- Use VS Code's secure storage API for any secrets -- Don't execute arbitrary user-provided code - -### Integration with syster-lsp - -The extension communicates with `crates/syster-lsp/` which provides: -- Document synchronization -- Diagnostics (parse errors) -- Code completion -- Go to definition -- Find references -- Hover information -- Symbol outline -- Code formatting -- Rename symbol -- Semantic tokens (syntax highlighting) -- Inlay hints -- Folding ranges -- Selection ranges - -Ensure the extension properly: -1. Starts and stops the server lifecycle -2. Handles server crashes/restarts -3. Passes configuration to server -4. Displays diagnostics to user -5. Registers all supported LSP features - -## VS Code Extension Manifest - -Key sections in `package.json`: -- `engines.vscode` - Minimum VS Code version -- `activationEvents` - When to activate the extension -- `contributes.languages` - Language definitions (SysML, KerML) -- `contributes.grammars` - TextMate grammars for syntax highlighting -- `contributes.configuration` - Extension settings -- `main` - Entry point file - -## Related Documentation - -- [VS Code Extension API](https://code.visualstudio.com/api) -- [Language Server Protocol](https://microsoft.github.io/language-server-protocol/) -- [vscode-languageclient](https://github.com/microsoft/vscode-languageserver-node) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8322353a..a0a5787f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,6 @@ # Meta-repo CI workflow # This repo is a meta-repository that aggregates submodules. -# Each submodule (syster-base, syster-cli, syster-lsp) has its own CI. +# Each submodule has its own CI workflow. # This workflow validates that submodules are properly configured. name: CI @@ -26,12 +26,15 @@ jobs: git submodule status echo "All submodules are properly configured." - - name: Validate Cargo.toml + - name: Validate structure run: | - echo "Checking Cargo.toml..." - if grep -q 'members = \[\]' Cargo.toml; then - echo "✓ Meta-repo workspace configured correctly (no members)" - else - echo "✗ Expected meta-repo with no workspace members" - exit 1 - fi + echo "Checking repository structure..." + for dir in base cli language-server language-client modeller viewer diagram-core diagram-ui pipelines; do + if [ -d "$dir" ]; then + echo "✓ $dir exists" + else + echo "✗ $dir missing" + exit 1 + fi + done + echo "All expected directories present." diff --git a/.github/workflows/copilot-auto-retry.yml b/.github/workflows/copilot-auto-retry.yml deleted file mode 100644 index 093071c6..00000000 --- a/.github/workflows/copilot-auto-retry.yml +++ /dev/null @@ -1,102 +0,0 @@ -name: Auto-notify Copilot on CI Failure - -on: - workflow_run: - workflows: ["CI"] - types: [completed] - -jobs: - notify-copilot: - if: github.event.workflow_run.conclusion == 'failure' && github.event.workflow_run.event == 'pull_request' - runs-on: ubuntu-latest - permissions: - pull-requests: write - actions: read - contents: read - - steps: - - name: Get PR number - id: pr - uses: actions/github-script@v7 - with: - script: | - try { - const pulls = await github.rest.pulls.list({ - owner: context.repo.owner, - repo: context.repo.repo, - head: `${github.event.workflow_run.head_repository.owner.login}:${github.event.workflow_run.head_branch}`, - state: 'open' - }); - - if (pulls.data.length === 0) { - console.log('No open PR found for this branch'); - return 'none'; - } - - return pulls.data[0].number.toString(); - } catch (error) { - console.error('Error fetching PR:', error); - return 'none'; - } - result-encoding: string - - - name: Check if already notified - if: steps.pr.outputs.result != 'none' - id: check-notified - uses: actions/github-script@v7 - with: - script: | - try { - const prNumber = parseInt('${{ steps.pr.outputs.result }}'); - const comments = await github.rest.issues.listComments({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: prNumber, - per_page: 5, - sort: 'created', - direction: 'desc', - }); - - // Check if Copilot was already notified in the most recent 5 comments - const alreadyNotified = comments.data.some(comment => - comment.body.includes('@copilot') && - comment.body.includes('CI pipeline failed') - ); - - return alreadyNotified ? 'true' : 'false'; - } catch (error) { - console.error('Error checking for duplicate notifications:', error); - return 'false'; - } - result-encoding: string - - - name: Get workflow run logs URL - if: steps.pr.outputs.result != 'none' && steps.check-notified.outputs.result == 'false' - id: logs - uses: actions/github-script@v7 - with: - script: | - const runId = github.event.workflow_run.id; - const url = `https://github.com/${context.repo.owner}/${context.repo.repo}/actions/runs/${runId}`; - return url; - result-encoding: string - - - name: Comment on PR - if: steps.pr.outputs.result != 'none' && steps.check-notified.outputs.result == 'false' - uses: actions/github-script@v7 - with: - script: | - try { - const prNumber = parseInt('${{ steps.pr.outputs.result }}'); - const logsUrl = '${{ steps.logs.outputs.result }}'; - - await github.rest.issues.createComment({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: prNumber, - body: `@copilot The CI pipeline failed. Please analyze the errors and fix the issues.\n\n📋 [View failed workflow run](${logsUrl})` - }); - } catch (error) { - console.error('Error posting comment:', error); - throw error; - } diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7dc3465a..7ac8cfc0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -37,6 +37,7 @@ jobs: echo "version=$VERSION" >> $GITHUB_OUTPUT echo "Release version: $VERSION" + # Rust binaries - name: Download syster-lsp binaries uses: dawidd6/action-download-artifact@v3 with: @@ -61,6 +62,68 @@ jobs: search_artifacts: true continue-on-error: true + # VS Code extensions + - name: Download language-client extension + uses: dawidd6/action-download-artifact@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + repo: jade-codes/syster-vscode-lsp + workflow: ci.yml + branch: main + name: vsix-* + path: artifacts/language-client + search_artifacts: true + continue-on-error: true + + - name: Download modeller extension + uses: dawidd6/action-download-artifact@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + repo: jade-codes/syster-vscode-modeller + workflow: ci.yml + branch: main + name: vsix-* + path: artifacts/modeller + search_artifacts: true + continue-on-error: true + + - name: Download viewer extension + uses: dawidd6/action-download-artifact@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + repo: jade-codes/syster-vscode-viewer + workflow: ci.yml + branch: main + name: vsix-* + path: artifacts/viewer + search_artifacts: true + continue-on-error: true + + # npm packages + - name: Download diagram-core package + uses: dawidd6/action-download-artifact@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + repo: jade-codes/syster-diagram-core + workflow: ci.yml + branch: main + name: npm-package + path: artifacts/diagram-core + search_artifacts: true + continue-on-error: true + + - name: Download diagram-ui package + uses: dawidd6/action-download-artifact@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + repo: jade-codes/syster-diagram-ui + workflow: ci.yml + branch: main + name: npm-package + path: artifacts/diagram-ui + search_artifacts: true + continue-on-error: true + - name: List collected artifacts run: | echo "=== Collected Artifacts ===" @@ -68,38 +131,10 @@ jobs: - name: Package artifacts run: | - VERSION="${{ steps.version.outputs.version }}" mkdir -p release - # Package syster-lsp binaries - if [ -d "artifacts/syster-lsp" ]; then - for dir in artifacts/syster-lsp/binaries-*; do - if [ -d "$dir" ]; then - target=$(basename "$dir" | sed 's/binaries-//') - echo "Packaging syster-lsp for $target" - cd "$dir" - if [ -f "syster-lsp" ] || [ -f "syster-lsp.exe" ]; then - tar -czf "../../release/syster-lsp-${VERSION}-${target}.tar.gz" * - fi - cd - > /dev/null - fi - done - fi - - # Package syster-cli binaries - if [ -d "artifacts/syster-cli" ]; then - for dir in artifacts/syster-cli/binaries-*; do - if [ -d "$dir" ]; then - target=$(basename "$dir" | sed 's/binaries-//') - echo "Packaging syster-cli for $target" - cd "$dir" - if [ -f "syster" ] || [ -f "syster.exe" ]; then - tar -czf "../../release/syster-cli-${VERSION}-${target}.tar.gz" * - fi - cd - > /dev/null - fi - done - fi + # Copy all artifacts to release folder + find artifacts -type f \( -name "*.tar.gz" -o -name "*.zip" -o -name "*.vsix" -o -name "*.tgz" \) -exec cp {} release/ \; 2>/dev/null || true ls -la release/ || echo "No packages created" @@ -141,13 +176,28 @@ jobs: body: | ## Syster ${{ steps.version.outputs.version }} - This release includes: + This release includes all Syster components: + + ### Binaries - **syster-cli**: Command-line tool for SysML v2 analysis - **syster-lsp**: Language Server Protocol implementation + ### VS Code Extensions + - **syster-lsp**: Language support (syntax, diagnostics, completion) + - **syster-modeller**: Visual diagram editor + - **syster-viewer**: Read-only diagram viewer + + ### npm Packages + - **@syster/diagram-core**: Diagram types and layout utilities + - **@syster/diagram-ui**: React Flow diagram components + ### Installation - Download the appropriate binary for your platform and extract it. + **CLI/LSP**: Download the appropriate binary for your platform and extract it. + + **VS Code Extensions**: Install the `.vsix` files via `Extensions: Install from VSIX...` + + **npm Packages**: `npm install @syster/diagram-core @syster/diagram-ui` ### Platforms - Linux (x86_64) diff --git a/.gitmodules b/.gitmodules index ed2bf4c9..7b02c25e 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,27 +1,27 @@ -[submodule "crates/syster-base"] - path = crates/syster-base +[submodule "pipelines"] + path = pipelines + url = https://github.com/jade-codes/syster-pipelines.git +[submodule "base"] + path = base url = https://github.com/jade-codes/syster-base.git -[submodule "crates/syster-cli"] - path = crates/syster-cli +[submodule "cli"] + path = cli url = https://github.com/jade-codes/syster-cli.git -[submodule "crates/syster-lsp"] - path = crates/syster-lsp +[submodule "language-server"] + path = language-server url = https://github.com/jade-codes/syster-lsp.git -[submodule "packages/diagram-core"] - path = packages/diagram-core +[submodule "language-client"] + path = language-client + url = https://github.com/jade-codes/syster-vscode-lsp.git +[submodule "diagram-core"] + path = diagram-core url = https://github.com/jade-codes/syster-diagram-core.git -[submodule "packages/diagram-ui"] - path = packages/diagram-ui +[submodule "diagram-ui"] + path = diagram-ui url = https://github.com/jade-codes/syster-diagram-ui.git -[submodule "editors/vscode-viewer"] - path = editors/vscode-viewer - url = https://github.com/jade-codes/syster-vscode-viewer.git -[submodule "editors/vscode-modeller"] - path = editors/vscode-modeller +[submodule "modeller"] + path = modeller url = https://github.com/jade-codes/syster-vscode-modeller.git -[submodule "pipelines"] - path = pipelines - url = https://github.com/jade-codes/syster-pipelines.git -[submodule "editors/vscode-lsp"] - path = editors/vscode-lsp - url = https://github.com/jade-codes/syster-vscode-lsp.git +[submodule "viewer"] + path = viewer + url = https://github.com/jade-codes/syster-vscode-viewer.git diff --git a/Cargo.lock b/Cargo.lock deleted file mode 100644 index 04bbadad..00000000 --- a/Cargo.lock +++ /dev/null @@ -1,919 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 4 - -[[package]] -name = "aho-corasick" -version = "1.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301" -dependencies = [ - "memchr", -] - -[[package]] -name = "anstream" -version = "0.6.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43d5b281e737544384e969a5ccad3f1cdd24b48086a0fc1b2a5262a26b8f4f4a" -dependencies = [ - "anstyle", - "anstyle-parse", - "anstyle-query", - "anstyle-wincon", - "colorchoice", - "is_terminal_polyfill", - "utf8parse", -] - -[[package]] -name = "anstyle" -version = "1.0.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5192cca8006f1fd4f7237516f40fa183bb07f8fbdfedaa0036de5ea9b0b45e78" - -[[package]] -name = "anstyle-parse" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2" -dependencies = [ - "utf8parse", -] - -[[package]] -name = "anstyle-query" -version = "1.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc" -dependencies = [ - "windows-sys", -] - -[[package]] -name = "anstyle-wincon" -version = "3.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d" -dependencies = [ - "anstyle", - "once_cell_polyfill", - "windows-sys", -] - -[[package]] -name = "anyhow" -version = "1.0.100" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a23eb6b1614318a8071c9b2521f36b424b2c83db5eb3a0fead4a6c0809af6e61" - -[[package]] -name = "beef" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a8241f3ebb85c056b509d4327ad0358fbbba6ffb340bf388f26350aeda225b1" - -[[package]] -name = "bitflags" -version = "2.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3" - -[[package]] -name = "block-buffer" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" -dependencies = [ - "generic-array", -] - -[[package]] -name = "bytes" -version = "1.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b35204fbdc0b3f4446b89fc1ac2cf84a8a68971995d0bf2e925ec7cd960f9cb3" - -[[package]] -name = "cfg-if" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" - -[[package]] -name = "clap" -version = "4.5.54" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6e6ff9dcd79cff5cd969a17a545d79e84ab086e444102a591e288a8aa3ce394" -dependencies = [ - "clap_builder", - "clap_derive", -] - -[[package]] -name = "clap_builder" -version = "4.5.54" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa42cf4d2b7a41bc8f663a7cab4031ebafa1bf3875705bfaf8466dc60ab52c00" -dependencies = [ - "anstream", - "anstyle", - "clap_lex", - "strsim", -] - -[[package]] -name = "clap_derive" -version = "4.5.49" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a0b5487afeab2deb2ff4e03a807ad1a03ac532ff5a2cee5d86884440c7f7671" -dependencies = [ - "heck", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "clap_lex" -version = "0.7.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3e64b0cc0439b12df2fa678eae89a1c56a529fd067a9115f7827f1fffd22b32" - -[[package]] -name = "colorchoice" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75" - -[[package]] -name = "countme" -version = "3.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7704b5fdd17b18ae31c4c1da5a2e0305a2bf17b5249300a9ee9ed7b72114c636" - -[[package]] -name = "cpufeatures" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" -dependencies = [ - "libc", -] - -[[package]] -name = "crossbeam-deque" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51" -dependencies = [ - "crossbeam-epoch", - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-epoch" -version = "0.9.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" -dependencies = [ - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-utils" -version = "0.8.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" - -[[package]] -name = "crypto-common" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" -dependencies = [ - "generic-array", - "typenum", -] - -[[package]] -name = "digest" -version = "0.10.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" -dependencies = [ - "block-buffer", - "crypto-common", -] - -[[package]] -name = "either" -version = "1.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" - -[[package]] -name = "equivalent" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" - -[[package]] -name = "errno" -version = "0.3.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" -dependencies = [ - "libc", - "windows-sys", -] - -[[package]] -name = "fastrand" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" - -[[package]] -name = "fnv" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" - -[[package]] -name = "from-pest" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f6608105256838dc3a7586083a8e4485ca6533bf1a39c3ed327e9de16a39e7f" -dependencies = [ - "log", - "pest", - "void", -] - -[[package]] -name = "futures-core" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" - -[[package]] -name = "futures-macro" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "futures-sink" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" - -[[package]] -name = "futures-task" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" - -[[package]] -name = "futures-timer" -version = "3.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f288b0a4f20f9a56b5d1da57e2227c661b7b16168e2f72365f57b63326e29b24" - -[[package]] -name = "futures-util" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" -dependencies = [ - "futures-core", - "futures-macro", - "futures-task", - "pin-project-lite", - "pin-utils", - "slab", -] - -[[package]] -name = "generic-array" -version = "0.14.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" -dependencies = [ - "typenum", - "version_check", -] - -[[package]] -name = "getrandom" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" -dependencies = [ - "cfg-if", - "libc", - "r-efi", - "wasip2", -] - -[[package]] -name = "glob" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280" - -[[package]] -name = "hashbrown" -version = "0.14.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" - -[[package]] -name = "hashbrown" -version = "0.16.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" - -[[package]] -name = "heck" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" - -[[package]] -name = "indexmap" -version = "2.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7714e70437a7dc3ac8eb7e6f8df75fd8eb422675fc7678aff7364301092b1017" -dependencies = [ - "equivalent", - "hashbrown 0.16.1", -] - -[[package]] -name = "is_terminal_polyfill" -version = "1.70.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695" - -[[package]] -name = "itertools" -version = "0.10.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" -dependencies = [ - "either", -] - -[[package]] -name = "lazy_static" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" - -[[package]] -name = "libc" -version = "0.2.180" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcc35a38544a891a5f7c865aca548a982ccb3b8650a5b06d0fd33a10283c56fc" - -[[package]] -name = "linux-raw-sys" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df1d3c3b53da64cf5760482273a98e575c651a67eec7f77df96b5b642de8f039" - -[[package]] -name = "log" -version = "0.4.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" - -[[package]] -name = "logos" -version = "0.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff472f899b4ec2d99161c51f60ff7075eeb3097069a36050d8037a6325eb8154" -dependencies = [ - "logos-derive", -] - -[[package]] -name = "logos-codegen" -version = "0.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "192a3a2b90b0c05b27a0b2c43eecdb7c415e29243acc3f89cc8247a5b693045c" -dependencies = [ - "beef", - "fnv", - "lazy_static", - "proc-macro2", - "quote", - "regex-syntax", - "rustc_version", - "syn", -] - -[[package]] -name = "logos-derive" -version = "0.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "605d9697bcd5ef3a42d38efc51541aa3d6a4a25f7ab6d1ed0da5ac632a26b470" -dependencies = [ - "logos-codegen", -] - -[[package]] -name = "memchr" -version = "2.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" - -[[package]] -name = "once_cell" -version = "1.21.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" - -[[package]] -name = "once_cell_polyfill" -version = "1.70.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" - -[[package]] -name = "pest" -version = "2.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c9eb05c21a464ea704b53158d358a31e6425db2f63a1a7312268b05fe2b75f7" -dependencies = [ - "memchr", - "ucd-trie", -] - -[[package]] -name = "pest-ast" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee0348ed5e4fdd30965042a0fcafe9702f7ef5e71f3f1e12404e8ed3b0ebfb3b" -dependencies = [ - "itertools", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "pest_derive" -version = "2.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68f9dbced329c441fa79d80472764b1a2c7e57123553b8519b36663a2fb234ed" -dependencies = [ - "pest", - "pest_generator", -] - -[[package]] -name = "pest_generator" -version = "2.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bb96d5051a78f44f43c8f712d8e810adb0ebf923fc9ed2655a7f66f63ba8ee5" -dependencies = [ - "pest", - "pest_meta", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "pest_meta" -version = "2.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "602113b5b5e8621770cfd490cfd90b9f84ab29bd2b0e49ad83eb6d186cef2365" -dependencies = [ - "pest", - "sha2", -] - -[[package]] -name = "pin-project-lite" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" - -[[package]] -name = "pin-utils" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" - -[[package]] -name = "proc-macro-crate" -version = "3.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "219cb19e96be00ab2e37d6e299658a0cfa83e52429179969b0f0121b4ac46983" -dependencies = [ - "toml_edit", -] - -[[package]] -name = "proc-macro2" -version = "1.0.105" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "535d180e0ecab6268a3e718bb9fd44db66bbbc256257165fc699dadf70d16fe7" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "quote" -version = "1.0.43" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc74d9a594b72ae6656596548f56f667211f8a97b3d4c3d467150794690dc40a" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "r-efi" -version = "5.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" - -[[package]] -name = "rayon" -version = "1.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "368f01d005bf8fd9b1206fb6fa653e6c4a81ceb1466406b81792d87c5677a58f" -dependencies = [ - "either", - "rayon-core", -] - -[[package]] -name = "rayon-core" -version = "1.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22e18b0f0062d30d4230b2e85ff77fdfe4326feb054b9783a3460d8435c8ab91" -dependencies = [ - "crossbeam-deque", - "crossbeam-utils", -] - -[[package]] -name = "regex" -version = "1.12.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "843bc0191f75f3e22651ae5f1e72939ab2f72a4bc30fa80a066bd66edefc24d4" -dependencies = [ - "aho-corasick", - "memchr", - "regex-automata", - "regex-syntax", -] - -[[package]] -name = "regex-automata" -version = "0.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5276caf25ac86c8d810222b3dbb938e512c55c6831a10f3e6ed1c93b84041f1c" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax", -] - -[[package]] -name = "regex-syntax" -version = "0.8.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a2d987857b319362043e95f5353c0535c1f58eec5336fdfcf626430af7def58" - -[[package]] -name = "relative-path" -version = "1.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba39f3699c378cd8970968dcbff9c43159ea4cfbd88d43c00b22f2ef10a435d2" - -[[package]] -name = "rowan" -version = "0.16.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "417a3a9f582e349834051b8a10c8d71ca88da4211e4093528e36b9845f6b5f21" -dependencies = [ - "countme", - "hashbrown 0.14.5", - "rustc-hash", - "text-size", -] - -[[package]] -name = "rstest" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fc39292f8613e913f7df8fa892b8944ceb47c247b78e1b1ae2f09e019be789d" -dependencies = [ - "futures-timer", - "futures-util", - "rstest_macros", - "rustc_version", -] - -[[package]] -name = "rstest_macros" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f168d99749d307be9de54d23fd226628d99768225ef08f6ffb52e0182a27746" -dependencies = [ - "cfg-if", - "glob", - "proc-macro-crate", - "proc-macro2", - "quote", - "regex", - "relative-path", - "rustc_version", - "syn", - "unicode-ident", -] - -[[package]] -name = "rustc-hash" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" - -[[package]] -name = "rustc_version" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" -dependencies = [ - "semver", -] - -[[package]] -name = "rustix" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "146c9e247ccc180c1f61615433868c99f3de3ae256a30a43b49f67c2d9171f34" -dependencies = [ - "bitflags", - "errno", - "libc", - "linux-raw-sys", - "windows-sys", -] - -[[package]] -name = "semver" -version = "1.0.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d767eb0aabc880b29956c35734170f26ed551a859dbd361d140cdbeca61ab1e2" - -[[package]] -name = "serde_core" -version = "1.0.228" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde_derive" -version = "1.0.228" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "sha2" -version = "0.10.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest", -] - -[[package]] -name = "slab" -version = "0.4.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a2ae44ef20feb57a68b23d846850f861394c2e02dc425a50098ae8c90267589" - -[[package]] -name = "strsim" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" - -[[package]] -name = "syn" -version = "2.0.114" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4d107df263a3013ef9b1879b0df87d706ff80f65a86ea879bd9c31f9b307c2a" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "syster-base" -version = "0.1.8-alpha" -dependencies = [ - "from-pest", - "logos", - "pest", - "pest-ast", - "pest_derive", - "rayon", - "rowan", - "rstest", - "tokio-util", - "unicode-ident", -] - -[[package]] -name = "syster-base" -version = "0.1.8-alpha" -source = "git+https://github.com/jade-codes/syster-base.git#fc453b6b5e07f089c5771cd5586d67660e089917" -dependencies = [ - "from-pest", - "pest", - "pest-ast", - "pest_derive", - "rayon", - "rowan", - "unicode-ident", -] - -[[package]] -name = "syster-cli" -version = "0.1.8-alpha" -dependencies = [ - "anyhow", - "clap", - "syster-base 0.1.8-alpha (git+https://github.com/jade-codes/syster-base.git)", - "tempfile", -] - -[[package]] -name = "tempfile" -version = "3.24.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "655da9c7eb6305c55742045d5a8d2037996d61d8de95806335c7c86ce0f82e9c" -dependencies = [ - "fastrand", - "getrandom", - "once_cell", - "rustix", - "windows-sys", -] - -[[package]] -name = "text-size" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f18aa187839b2bdb1ad2fa35ead8c4c2976b64e4363c386d45ac0f7ee85c9233" - -[[package]] -name = "tokio" -version = "1.49.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72a2903cd7736441aac9df9d7688bd0ce48edccaadf181c3b90be801e81d3d86" -dependencies = [ - "pin-project-lite", -] - -[[package]] -name = "tokio-util" -version = "0.7.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ae9cec805b01e8fc3fd2fe289f89149a9b66dd16786abd8b19cfa7b48cb0098" -dependencies = [ - "bytes", - "futures-core", - "futures-sink", - "pin-project-lite", - "tokio", -] - -[[package]] -name = "toml_datetime" -version = "0.7.5+spec-1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92e1cfed4a3038bc5a127e35a2d360f145e1f4b971b551a2ba5fd7aedf7e1347" -dependencies = [ - "serde_core", -] - -[[package]] -name = "toml_edit" -version = "0.23.10+spec-1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84c8b9f757e028cee9fa244aea147aab2a9ec09d5325a9b01e0a49730c2b5269" -dependencies = [ - "indexmap", - "toml_datetime", - "toml_parser", - "winnow", -] - -[[package]] -name = "toml_parser" -version = "1.0.6+spec-1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3198b4b0a8e11f09dd03e133c0280504d0801269e9afa46362ffde1cbeebf44" -dependencies = [ - "winnow", -] - -[[package]] -name = "typenum" -version = "1.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "562d481066bde0658276a35467c4af00bdc6ee726305698a55b86e61d7ad82bb" - -[[package]] -name = "ucd-trie" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2896d95c02a80c6d6a5d6e953d479f5ddf2dfdb6a244441010e373ac0fb88971" - -[[package]] -name = "unicode-ident" -version = "1.0.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5" - -[[package]] -name = "utf8parse" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" - -[[package]] -name = "version_check" -version = "0.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" - -[[package]] -name = "void" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" - -[[package]] -name = "wasip2" -version = "1.0.1+wasi-0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0562428422c63773dad2c345a1882263bbf4d65cf3f42e90921f787ef5ad58e7" -dependencies = [ - "wit-bindgen", -] - -[[package]] -name = "windows-link" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" - -[[package]] -name = "windows-sys" -version = "0.61.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" -dependencies = [ - "windows-link", -] - -[[package]] -name = "winnow" -version = "0.7.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a5364e9d77fcdeeaa6062ced926ee3381faa2ee02d3eb83a5c27a8825540829" -dependencies = [ - "memchr", -] - -[[package]] -name = "wit-bindgen" -version = "0.46.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f17a85883d4e6d00e8a97c586de764dabcc06133f7f1d55dce5cdc070ad7fe59" diff --git a/Cargo.toml b/Cargo.toml deleted file mode 100644 index b30703e0..00000000 --- a/Cargo.toml +++ /dev/null @@ -1,159 +0,0 @@ -# Syster Meta-Repository -# This workspace aggregates all Syster Rust crates via git submodules. -# Each crate lives in its own repository for independent development and versioning. -# -# Note: Each crate is an independent project with its own Cargo.toml. -# Build each crate separately: -# cd crates/syster-base && cargo build -# cd crates/syster-cli && cargo build -# cd crates/syster-lsp && cargo build - -[workspace] -members = [] -exclude = [ - "crates/syster-base", - "crates/syster-cli", - "crates/syster-lsp", -] -resolver = "2" - -[workspace.package] -version = "0.1.0" -edition = "2024" -authors = ["jade-codes"] -license = "MIT" -repository = "https://github.com/jade-codes/syster" - -[workspace.lints.clippy] -# Enforce explicit error handling -unwrap_used = "warn" -expect_used = "warn" -panic = "warn" -todo = "warn" -unimplemented = "warn" - -# Code quality -dbg_macro = "warn" -print_stdout = "warn" -print_stderr = "warn" -missing_errors_doc = "warn" -missing_panics_doc = "warn" - -# Performance -inefficient_to_string = "warn" -unnecessary_wraps = "warn" - -# Style consistency -enum_glob_use = "warn" -wildcard_imports = "warn" - -# Test quality - deny control flow complexity in tests -collapsible_if = "warn" -collapsible_else_if = "warn" -cognitive_complexity = "deny" - -# Deny by category (set explicit priority to avoid ambiguity) -correctness = { level = "deny", priority = -1 } -suspicious = { level = "deny", priority = -1 } -complexity = { level = "deny", priority = -1 } -perf = { level = "deny", priority = -1 } - -# ============================================================================ -# Build Optimization Profiles -# ============================================================================ - -# Dev profile: optimize for fast compile times -[profile.dev] -opt-level = 0 -debug = true -incremental = true -# More codegen units = faster compile, slower runtime (fine for dev) -codegen-units = 256 - -# Dev dependencies can be optimized (tests run faster) -[profile.dev.package."*"] -opt-level = 1 - -# Test profile inherits from dev but can have overrides -# Using opt-level = 1 for faster tests while keeping debug info -[profile.test] -opt-level = 1 -debug = true -incremental = true - -# Optimize parsing dependencies in test builds for faster tests -[profile.test.package.pest] -opt-level = 3 - -[profile.test.package.pest_derive] -opt-level = 3 - -[profile.test.package.pest_meta] -opt-level = 3 - -[profile.test.package.pest_generator] -opt-level = 3 - -# Also optimize in dev builds -[profile.dev.package.pest] -opt-level = 3 - -[profile.dev.package.pest_derive] -opt-level = 3 - -[profile.dev.package.pest_meta] -opt-level = 3 - -[profile.dev.package.pest_generator] -opt-level = 3 - -# Optimize other parsing/syntax dependencies -[profile.dev.package.rowan] -opt-level = 3 - -[profile.dev.package.logos] -opt-level = 3 - -[profile.dev.package.from-pest] -opt-level = 3 - -[profile.dev.package.pest-ast] -opt-level = 3 - -[profile.dev.package.rayon] -opt-level = 3 - -[profile.dev.package.rayon-core] -opt-level = 3 - -[profile.test.package.rowan] -opt-level = 3 - -[profile.test.package.logos] -opt-level = 3 - -[profile.test.package.from-pest] -opt-level = 3 - -[profile.test.package.pest-ast] -opt-level = 3 - -[profile.test.package.rayon] -opt-level = 3 - -[profile.test.package.rayon-core] -opt-level = 3 - -# Release profile: balanced for dev containers (lower memory usage) -[profile.release] -opt-level = 3 -lto = false -codegen-units = 16 -strip = true - -# Production profile: maximum optimization (use with `cargo build --profile production`) -# Requires more memory - may fail in constrained environments -[profile.production] -inherits = "release" -lto = "thin" -codegen-units = 1 diff --git a/README.md b/README.md index 953c1fd2..b91d7277 100644 --- a/README.md +++ b/README.md @@ -4,38 +4,72 @@ A Rust-based parser and tooling for SysML v2 (Systems Modeling Language) and KerML (Kernel Modeling Language). -## Meta-Repository Structure - -This is a **meta-repository** that aggregates all Syster components via Git submodules. Each component lives in its own repository for independent development and versioning. - -### Rust Crates - -| Component | Repository | Description | -|-----------|------------|-------------| -| **syster-base** | [jade-codes/syster-base](https://github.com/jade-codes/syster-base) | Core library with parser, AST, and semantic analysis | -| **syster-cli** | [jade-codes/syster-cli](https://github.com/jade-codes/syster-cli) | Command-line tool for analyzing SysML/KerML files | -| **syster-lsp** | [jade-codes/syster-lsp](https://github.com/jade-codes/syster-lsp) | Language Server Protocol implementation with VS Code extension | - -### TypeScript Packages +## Architecture + +```mermaid +graph TB + subgraph "SysML v2 Files" + SysML[".sysml / .kerml"] + end + + subgraph "Core (Rust)" + Base[base
Parser, AST, Semantic Analysis] + CLI[cli
Command Line Tool] + LSP[language-server
LSP Implementation] + end + + subgraph "VS Code Extensions (TypeScript)" + Client[language-client
LSP Extension] + Modeller[modeller
Diagram Editor] + Viewer[viewer
Diagram Viewer] + end + + subgraph "Diagram Library (TypeScript)" + Core[diagram-core
Types & Layout] + UI[diagram-ui
React Components] + end + + SysML --> Base + Base --> CLI + Base --> LSP + LSP <--> Client + Core --> UI + UI --> Modeller + UI --> Viewer + Client --> Modeller + Client --> Viewer +``` -| Component | Repository | Description | -|-----------|------------|-------------| -| **@syster/diagram-core** | [jade-codes/syster-diagram-core](https://github.com/jade-codes/syster-diagram-core) | Core diagram types and layout algorithms | -| **@syster/diagram-ui** | [jade-codes/syster-diagram-ui](https://github.com/jade-codes/syster-diagram-ui) | React Flow UI components for diagrams | +## Repository Structure -### VS Code Extensions +Feature-based organization with independent submodules for versioning flexibility. -| Extension | Repository | Description | -|-----------|------------|-------------| -| **sysml-language-support** | [jade-codes/syster-vscode-lsp](https://github.com/jade-codes/syster-vscode-lsp) | Main language support extension (LSP client) | -| **syster-viewer** | [jade-codes/syster-vscode-viewer](https://github.com/jade-codes/syster-vscode-viewer) | Diagram viewer extension | -| **syster-modeller** | [jade-codes/syster-vscode-modeller](https://github.com/jade-codes/syster-vscode-modeller) | Diagram modeller extension | +``` +syster/ +├── base/ # Parser, AST, semantic analysis +├── cli/ # Command-line tool +├── language-server/ # Language Server Protocol implementation +├── language-client/ # VS Code LSP extension +├── modeller/ # VS Code modeller extension +├── viewer/ # VS Code viewer extension +├── diagram-core/ # Diagram types and layout (TypeScript) +├── diagram-ui/ # React Flow components (TypeScript) +└── pipelines/ # CI/CD pipeline templates +``` -### Infrastructure +### Components -| Component | Repository | Description | -|-----------|------------|-------------| -| **syster-pipelines** | [jade-codes/syster-pipelines](https://github.com/jade-codes/syster-pipelines) | CI/CD pipeline templates | +| Feature | Path | Repository | Description | +|---------|------|------------|-------------| +| **Base** | `base/` | [syster-base](https://github.com/jade-codes/syster-base) | Parser, AST, semantic analysis | +| **CLI** | `cli/` | [syster-cli](https://github.com/jade-codes/syster-cli) | Command-line tool | +| **LSP Server** | `language-server/` | [syster-lsp](https://github.com/jade-codes/syster-lsp) | Language Server Protocol | +| **LSP Client** | `language-client/` | [syster-vscode-lsp](https://github.com/jade-codes/syster-vscode-lsp) | VS Code language support | +| **Diagram Core** | `diagram-core/` | [syster-diagram-core](https://github.com/jade-codes/syster-diagram-core) | Diagram types (TS) | +| **Diagram UI** | `diagram-ui/` | [syster-diagram-ui](https://github.com/jade-codes/syster-diagram-ui) | React Flow components | +| **Modeller** | `modeller/` | [syster-vscode-modeller](https://github.com/jade-codes/syster-vscode-modeller) | VS Code modeller | +| **Viewer** | `viewer/` | [syster-vscode-viewer](https://github.com/jade-codes/syster-vscode-viewer) | VS Code viewer | +| **Pipelines** | `pipelines/` | [syster-pipelines](https://github.com/jade-codes/syster-pipelines) | CI/CD templates | ## Getting Started @@ -48,46 +82,48 @@ This repository includes a VS Code dev container with all development tools pre- 3. The container will automatically: - Initialize all git submodules - Install Rust, Node.js, and Bun - - Set up the VS Code LSP extension dependencies + - Set up dependencies ### Clone with Submodules -\`\`\`bash +```bash # Clone with all submodules git clone --recurse-submodules https://github.com/jade-codes/syster.git # Or if already cloned, initialize submodules git submodule update --init --recursive -\`\`\` +``` -### Build Rust Crates +### Build -Each crate is independent - build separately: +Each submodule is built independently. Navigate to the submodule directory and follow its README: -\`\`\`bash -cd crates/syster-base && cargo build && cargo test -cd crates/syster-cli && cargo build -cd crates/syster-lsp && cargo build -\`\`\` +```bash +# Build the base parser +cd base && cargo build && cargo test -### Build TypeScript Packages +# Build the CLI +cd cli && cargo build -```bash -cd editors/vscode-lsp && npm install && npm run esbuild -cd packages/diagram-core && bun install -cd packages/diagram-ui && bun install +# Build the LSP server +cd language-server && cargo build + +# Build VS Code extensions +cd language-client && npm install && npm run compile +cd modeller && npm install && npm run compile +cd viewer && npm install && npm run compile ``` ### Running the VS Code Extension Locally 1. Build the LSP binary: ```bash - cd crates/syster-lsp && cargo build --release + cd language-server && cargo build --release ``` 2. Build the extension: ```bash - cd editors/vscode-lsp && npm install && npm run esbuild + cd language-client && npm install && npm run esbuild ``` 3. Press `F5` in VS Code to launch the extension in a new window diff --git a/base b/base new file mode 160000 index 00000000..9c4e2039 --- /dev/null +++ b/base @@ -0,0 +1 @@ +Subproject commit 9c4e2039cc1cca7ea52147ebadbaca354324a7c9 diff --git a/cli b/cli new file mode 160000 index 00000000..e62fdb79 --- /dev/null +++ b/cli @@ -0,0 +1 @@ +Subproject commit e62fdb79c40e37f8054b11462baff6fae986a6bb diff --git a/crates/syster-base b/crates/syster-base deleted file mode 160000 index 3e599f30..00000000 --- a/crates/syster-base +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 3e599f30f4819dfe74a58d5c2ea7ba511e0eb49c diff --git a/crates/syster-cli b/crates/syster-cli deleted file mode 160000 index d770065f..00000000 --- a/crates/syster-cli +++ /dev/null @@ -1 +0,0 @@ -Subproject commit d770065f8f325afa405d2207474de5d50cc6bc19 diff --git a/crates/syster-lsp b/crates/syster-lsp deleted file mode 160000 index 29303ad9..00000000 --- a/crates/syster-lsp +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 29303ad9266c340af9c85b1ce53bc5317c0df721 diff --git a/diagram-core b/diagram-core new file mode 160000 index 00000000..562abd7f --- /dev/null +++ b/diagram-core @@ -0,0 +1 @@ +Subproject commit 562abd7f8779ea9e474a10e70f22a7d86ca2c2c0 diff --git a/diagram-ui b/diagram-ui new file mode 160000 index 00000000..39213fc9 --- /dev/null +++ b/diagram-ui @@ -0,0 +1 @@ +Subproject commit 39213fc95e1be41ff08e64c31974e93e8bf8136b diff --git a/editors/vscode-lsp b/editors/vscode-lsp deleted file mode 160000 index 788f0a17..00000000 --- a/editors/vscode-lsp +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 788f0a173cb8472e3eea8e245e514eed4acc8f3e diff --git a/editors/vscode-modeller b/editors/vscode-modeller deleted file mode 160000 index a8d2ac3c..00000000 --- a/editors/vscode-modeller +++ /dev/null @@ -1 +0,0 @@ -Subproject commit a8d2ac3c05ed374b5afd63b30c0c7c4e24307a55 diff --git a/editors/vscode-viewer b/editors/vscode-viewer deleted file mode 160000 index a5ca91a7..00000000 --- a/editors/vscode-viewer +++ /dev/null @@ -1 +0,0 @@ -Subproject commit a5ca91a735295f0c0b2abb4b36e706b02432e745 diff --git a/language-client b/language-client new file mode 160000 index 00000000..c8447b47 --- /dev/null +++ b/language-client @@ -0,0 +1 @@ +Subproject commit c8447b471a3fac7e803f40657e704a6519e82e20 diff --git a/language-server b/language-server new file mode 160000 index 00000000..33734da8 --- /dev/null +++ b/language-server @@ -0,0 +1 @@ +Subproject commit 33734da898a810be738b6bd34e4684d2fb9b4efe diff --git a/modeller b/modeller new file mode 160000 index 00000000..d080a21b --- /dev/null +++ b/modeller @@ -0,0 +1 @@ +Subproject commit d080a21b8b0da5f18beb495e9d11637983cddd31 diff --git a/package.json b/package.json deleted file mode 100644 index 05939011..00000000 --- a/package.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "name": "syster-meta", - "version": "0.1.0", - "private": true, - "description": "Syster - SysML v2 Parser and Tooling (Meta Repository). This is a meta-repository - each subdirectory is a git submodule with its own dependencies.", - "scripts": { - "postinstall": "echo 'Note: This is a meta-repo. Run npm install in individual submodules as needed.'", - "setup:vscode-lsp": "cd editors/vscode-lsp && npm install", - "setup:vscode-viewer": "cd editors/vscode-viewer && npm install", - "setup:vscode-modeller": "cd editors/vscode-modeller && npm install", - "setup:packages": "cd packages/diagram-core && bun install && cd ../diagram-ui && bun install", - "setup:all": "npm run setup:vscode-lsp && npm run setup:packages" - }, - "repository": { - "type": "git", - "url": "https://github.com/jade-codes/syster.git" - }, - "keywords": [ - "sysml", - "sysml-v2", - "kerml", - "parser", - "systems-engineering", - "modeling" - ], - "author": "jade-codes", - "license": "MIT" -} diff --git a/packages/diagram-core b/packages/diagram-core deleted file mode 160000 index a7887de5..00000000 --- a/packages/diagram-core +++ /dev/null @@ -1 +0,0 @@ -Subproject commit a7887de532c1fb4bb736eef41e33f3b1013bb63f diff --git a/packages/diagram-ui b/packages/diagram-ui deleted file mode 160000 index 702658a8..00000000 --- a/packages/diagram-ui +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 702658a8f8e40bce08e4a8d0b58cf258b02aa70d diff --git a/viewer b/viewer new file mode 160000 index 00000000..910fe632 --- /dev/null +++ b/viewer @@ -0,0 +1 @@ +Subproject commit 910fe63221b703bdea0f0b251c1f506fba213678