Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
46c346d
[WIP] Publishing and editing object scripts directly from the viewer.
Rider-Linden May 7, 2026
808125a
[WIP] Act as a consumer for objects published from the viewer. Treat…
Rider-Linden May 19, 2026
05aa031
Rider test (#73)
Rider-Linden May 27, 2026
f223244
chore: prepare release v1.0.4
github-actions[bot] May 27, 2026
7362406
Merge pull request #74 from secondlife/release/v1.0.4
Rider-Linden May 27, 2026
622a68c
Update README.md with marketplace url
WolfGangS Jun 5, 2026
d3a0c8e
Merge pull request #76 from WolfGangS/patch-1
Rider-Linden Jun 5, 2026
bf36af2
forced syntax update now uses the correct API
Rider-Linden Jun 18, 2026
bd582ee
Request correct files.
Rider-Linden Jun 18, 2026
22ffedf
[WIP] Publishing and editing object scripts directly from the viewer.
Rider-Linden May 7, 2026
83ffd93
[WIP] Act as a consumer for objects published from the viewer. Treat…
Rider-Linden May 19, 2026
9dd7553
Merge branch 'rider/poc/object_publish' of github.com:secondlife/sl-v…
Rider-Linden Jun 24, 2026
497173e
object publishing checkpoint.
Rider-Linden Jul 1, 2026
6f03dca
Large refactor, converting `normalizedPath` into `vscode.uri` where t…
Rider-Linden Jul 1, 2026
80792d5
couple of issues found in cr.
Rider-Linden Jul 2, 2026
1f0c89d
Third time I've tried to fix this file.
Rider-Linden Jul 2, 2026
aaf7e3f
Merge pull request #77 from secondlife/rider/refactor_tracking
Rider-Linden Jul 17, 2026
ede0e40
link scripts from published objects with scripts in the local directory.
Rider-Linden Jul 3, 2026
170ad2d
Numerous small issues, and more solid script creation.
Rider-Linden Jul 17, 2026
5a885e8
Updates to the interface doc.
Rider-Linden Jul 18, 2026
b702ebd
Fix preprocessing with published files.
Rider-Linden Jul 20, 2026
d16341a
Update the language defs.
Rider-Linden Jul 20, 2026
4b2719f
Object renaming, luau inventory icon, runstate, restart.
Rider-Linden Jul 21, 2026
0f00947
Left out a file... plus pre-commit.
Rider-Linden Jul 21, 2026
730cd0e
Trying to fix the precommits.
Rider-Linden Jul 21, 2026
1445dea
Some permission cleanup and fix rpc document TOC.
Rider-Linden Jul 22, 2026
a6508ba
Two more PR fixes.
Rider-Linden Jul 22, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ A standalone Node runtime implementation of `HostInterface` now exists at `src/s
Capabilities:
* File I/O (read/write text, JSON, YAML, TOML) using native fs + `js-yaml` + `@iarna/toml`.
* Include resolution logic ported from the VS Code host: supports relative paths, explicit `.` / `./subdir`, workspace-root relative paths, and wildcard directory patterns (e.g. `**/include/`). Uses `glob` for wildcard matching.
* Path normalization with `NormalizedPath` branding preserved.
* Path identification uses `StringUri` branding throughout.
* Workspace roots provided at construction (`new NodeHost({ roots, config })`).
* Minimal logger injection (optional) with no-op defaults.
* Config access fully delegated to injected `FullConfigInterface` implementation—no direct env or global lookups inside NodeHost.
Expand All @@ -243,7 +243,7 @@ Guidelines:
1. Do not introduce VS Code imports into `src/server/`.
2. Keep feature parity between extension host and NodeHost include resolution.
3. Add new serialization helpers via optional methods (feature-detect in callers) rather than expanding core method contracts.
4. Always return `NormalizedPath` for resolved files.
4. Always return `StringUri` for resolved files.

Future Extensions:
* Optional file watching (likely via `fs.watch` or chokidar) for cache invalidation.
Expand All @@ -266,24 +266,24 @@ Most services use optional chaining and the `maybe()` utility for safe property

Always use workspace-relative paths for security. Include paths are configurable via `includePaths` setting with patterns like `["./include/", "include/", "*/include/", "."]`.

#### NormalizedPath Abstraction (2025-09 Update)
#### StringUri Abstraction (2025-09 Update, replaced NormalizedPath 2026-07)

All internal path handling in the preprocessor layer now uses `NormalizedPath`, a branded string type produced by `normalizePath()` (see `llsharedutils`). This replaces previous reliance on `vscode.Uri` within core logic and tests.
All internal path handling in the preprocessor layer uses `StringUri`, a branded `string` type produced by `filePathToStringUri()` (see `hostinterface.ts`). This replaced the earlier `NormalizedPath`/`normalizePath()` approach and the reliance on `vscode.Uri` within core logic and tests.

Key guidelines:
- Do not store or compare raw/relative paths directly; always normalize first.
- Equality checks are simple strict equality (`===`) because normalization canonicalizes separators and casing rules (platform appropriate).
- Tests must no longer access `.fsPath` or other `Uri` properties—compare the `NormalizedPath` values directly.
- When constructing mappings (`LineMapping`), assign `sourceFile: NormalizedPath`.
- Do not store or compare raw/relative paths directly; always convert to `StringUri` first.
- Equality checks use `uriEquals()` (case-insensitive on Windows for `file://` URIs); use `uriKey()` for Map/Set keys.
- Tests compare `StringUri` values directly, not `.fsPath` or other `Uri` properties.
- When constructing mappings (`LineMapping`), assign `sourceFile: StringUri`.

#### HostInterface for Includes (formerly FileInterface)

`IncludeProcessor` now depends on an injected `HostInterface` (renamed from earlier `FileInterface` for broader future responsibilities) instead of directly using VS Code APIs. Implementations must provide:

```
readFile(path: NormalizedPath): Promise<string | null>
exists(path: NormalizedPath): Promise<boolean>
resolveFile(filename: string, from: NormalizedPath, extensions?: string[], includePaths?: string[]): Promise<NormalizedPath | null>
readFile(path: StringUri): Promise<string | null>
exists(path: StringUri): Promise<boolean>
resolveFile(filename: string, from: StringUri, extensions?: string[], includePaths?: string[]): Promise<StringUri | null>
```

Test shims may implement minimal logic (e.g., in-memory maps). For realistic include resolution tests, provide a hybrid in-memory + disk implementation and pass it to `new IncludeProcessor(fsImpl)`.
Expand Down Expand Up @@ -320,7 +320,7 @@ Deprecated/Removed (late Sept 2025): free helpers `getConfig` / `setConfig`.

`processInclude` signature:
```
processInclude(filename: string, sourceFile: NormalizedPath, isRequire: boolean, state: PreprocessorState)
processInclude(filename: string, sourceFile: StringUri, isRequire: boolean, state: PreprocessorState)
```
Static helper methods like `pathToGlobPattern` and `getIncludeDirectories` have been removed; tests referring to them should be deleted or rewritten.

Expand Down Expand Up @@ -354,7 +354,7 @@ expectMapping(mapping, processedLine, originalLine, filePathNormalized);
expectMappings(arrayOfMappings, [ [processed, original, file], ... ]);
```

Adopt these helpers when adding or modifying mapping tests. They perform strict equality on `NormalizedPath` and provide clearer failure messaging.
Adopt these helpers when adding or modifying mapping tests. They perform strict equality on `StringUri` and provide clearer failure messaging.

## Maintaining These Instructions

Expand All @@ -373,7 +373,7 @@ Examples of updates to include:
- Removed legacy global configuration helpers (`getConfig`, `setConfig`); explicit dependency injection via `host.config` only.
- HostInterface trimmed: configuration & path access consolidated under `FullConfigInterface` implementation (`LLConfigService`).
- Updated services and sync logic to use `LLConfigService.getInstance()` only at composition boundaries; core logic depends on abstracted `HostInterface` + `FullConfigInterface`.
- Ensured path branding (`NormalizedPath`) throughout preprocessing and language data flows.
- Ensured URI branding (`StringUri`) throughout preprocessing and language data flows.
- Guidance: New settings belong in `ConfigKey` + `LLConfigService`; avoid reintroducing host-level config APIs.

### 2025-10 Nested Require Processing (Oct 10)
Expand Down
76 changes: 6 additions & 70 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,22 @@ name: CI
on:
push:
branches: [ "*" ]
tags: [ "v*" ]
tags-ignore: [ "**" ]
pull_request:
branches: [ main, develop ]
workflow_dispatch:

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [24.x]

steps:
- name: Checkout code
uses: actions/checkout@v5

- name: Setup Node.js ${{ matrix.node-version }}
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
node-version: '24.x'
cache: 'npm'

- name: Install dependencies
Expand All @@ -41,7 +37,6 @@ jobs:

- name: Run full test suite
run: xvfb-run -a npm test
continue-on-error: false

build:
needs: test
Expand All @@ -66,26 +61,9 @@ jobs:
- name: Compile extension
run: npm run vscode:prepublish

- name: Determine version suffix
- name: Get build SHA
id: version
run: |
if [ "${{ github.ref }}" = "refs/heads/main" ]; then
echo "suffix=" >> $GITHUB_OUTPUT
echo "release_type=release" >> $GITHUB_OUTPUT
elif [ "${{ github.ref }}" = "refs/heads/debug" ]; then
echo "suffix=-debug" >> $GITHUB_OUTPUT
echo "release_type=debug" >> $GITHUB_OUTPUT
fi
echo "sha_short=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_OUTPUT

- name: Update package.json version for non-main builds
if: github.ref != 'refs/heads/main'
run: |
# Get current version and append build info
CURRENT_VERSION=$(node -p "require('./package.json').version")
NEW_VERSION="${CURRENT_VERSION}${{ steps.version.outputs.suffix }}-${GITHUB_RUN_NUMBER}+${{ steps.version.outputs.sha_short }}"
npm version "$NEW_VERSION" --no-git-tag-version
echo "Updated version to: $NEW_VERSION"
run: echo "sha_short=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_OUTPUT

- name: Package extension
run: vsce package
Expand All @@ -95,52 +73,10 @@ jobs:
run: |
PACKAGE_FILE=$(ls *.vsix | head -1)
echo "filename=$PACKAGE_FILE" >> $GITHUB_OUTPUT
echo "name=$(basename "$PACKAGE_FILE" .vsix)" >> $GITHUB_OUTPUT

- name: Upload VSIX artifact
uses: actions/upload-artifact@v4
with:
name: vscode-extension-${{ steps.version.outputs.release_type }}-${{ steps.version.outputs.sha_short }}
name: vscode-extension-${{ steps.version.outputs.sha_short }}
path: ${{ steps.package.outputs.filename }}
retention-days: 30

release:
name: Update release info
needs: build
runs-on: ubuntu-latest
timeout-minutes: 10
if: startsWith(github.ref, 'refs/tags/v')
permissions:
contents: write

steps:
- name: Get version from tag
id: version
run: |
VERSION=${GITHUB_REF#refs/tags/v}
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "tag=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT

- name: Download VSIX artifact
uses: actions/download-artifact@v4
with:
pattern: vscode-extension-*
merge-multiple: true

- name: Get package filename
id: package
run: |
PACKAGE_FILE=$(ls *.vsix | head -1)
echo "filename=$PACKAGE_FILE" >> $GITHUB_OUTPUT

- name: Create release
id: release
uses: secondlife-3p/action-gh-release@v1
with:
# name the release page for the branch
name: "SL-VScode Plugin ${{ steps.version.outputs.version }} Release"
prerelease: true
generate_release_notes: true
target_commitish: ${{ github.sha }}
append_body: true
files: ${{ steps.package.outputs.filename }}
48 changes: 48 additions & 0 deletions .github/workflows/generate-release-notes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Generate Release Notes

on:
workflow_call:
inputs:
tag_name:
description: Tag name to generate release notes for
required: true
type: string
target_commitish:
description: Branch or commit SHA used as target for note generation
required: true
type: string
outputs:
release_notes:
description: Generated release notes body
value: ${{ jobs.generate.outputs.release_notes }}

permissions:
contents: read

jobs:
generate:
runs-on: ubuntu-latest
outputs:
release_notes: ${{ steps.generate.outputs.release_notes }}

steps:
- name: Generate release notes body
id: generate
uses: actions/github-script@v7
env:
TAG_NAME: ${{ inputs.tag_name }}
TARGET_COMMITISH: ${{ inputs.target_commitish }}
with:
script: |
const { owner, repo } = context.repo;
const tag_name = process.env.TAG_NAME;
const target_commitish = process.env.TARGET_COMMITISH;

const response = await github.rest.repos.generateReleaseNotes({
owner,
repo,
tag_name,
target_commitish,
});

core.setOutput('release_notes', response.data.body || '');
10 changes: 3 additions & 7 deletions .github/workflows/pre-commit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ on:
branches: [main, develop]

permissions:
id-token: write
contents: read

jobs:
Expand All @@ -20,18 +19,15 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v6
with:
node-version: 'latest'
node-version: '24.x'
cache: 'npm'
- name: Install dependencies
run: npm install
run: npm ci

- name: Setup Python
uses: actions/setup-python@v6
with:
python-version: '3.x'

- name: Install pre-commit
run: pip install pre-commit

- name: Run pre-commit checks
run: pre-commit run --all-files
uses: pre-commit/action@v3.0.1
Loading
Loading