Skip to content

fix: harden compiler inputs and avoid root LSP scans - #148

Merged
CodeNinjaEvan merged 2 commits into
tronprotocol:release_0.8.30from
yanghang8612:fix/release-0.8.30-input-path-hardening
Jul 28, 2026
Merged

fix: harden compiler inputs and avoid root LSP scans#148
CodeNinjaEvan merged 2 commits into
tronprotocol:release_0.8.30from
yanghang8612:fix/release-0.8.30-input-path-hardening

Conversation

@yanghang8612

@yanghang8612 yanghang8612 commented Jul 28, 2026

Copy link
Copy Markdown

Summary

  • report a JSONError when settings.metadata.bytecodeHash has a non-string value
  • remove shell command construction from regression helpers and keep split sources inside the output directory
  • prevent the LSP project-directory strategy from recursively scanning the filesystem root when no workspace root is available

LSP scope

The LSP continues to allow absolute imports, include paths, and symlinks outside the workspace as upstream does. Only eager project discovery at a filesystem root is disabled; in that case the server analyzes directly opened and imported files instead.

Compatibility

This does not change contract ABI, bytecode, or runtime behavior. Normal workspace scanning and import resolution are unchanged. A client that deliberately uses the filesystem root as its project root no longer receives eager diagnostics for every Solidity file on the machine.

Tests

  • rebuilt solc
  • test/cmdlineTests.sh standard_wrong_type_bytecodeHash
  • LSP regression: project-directory initialization without a workspace root
  • existing LSP project-directory scanning test
  • existing LSP relative-import test
  • Python syntax checks and path/shell-metacharacter boundary checks for regressions.py and splitSources.py
  • git diff --check

The repository-wide style check still reports the pre-existing trailing whitespace at .github/workflows/build.yml:322.

@github-actions

Copy link
Copy Markdown

Thank you for your contribution to the Solidity compiler! A team member will follow up shortly.

If you haven't read our contributing guidelines and our review checklist before, please do it now, this makes the reviewing process and accepting your contribution smoother.

If you have any questions or need our help, feel free to post them in the PR or talk to us directly on the #solidity-dev channel on Matrix.

@yanghang8612
yanghang8612 force-pushed the fix/release-0.8.30-input-path-hardening branch from ec7bc91 to 8072fcf Compare July 28, 2026 09:19
@yanghang8612 yanghang8612 changed the title fix: harden compiler inputs and LSP path boundaries fix: harden compiler inputs and avoid root LSP scans Jul 28, 2026
@yanghang8612
yanghang8612 marked this pull request as ready for review July 28, 2026 10:03
@CodeNinjaEvan
CodeNinjaEvan merged commit 70623ec into tronprotocol:release_0.8.30 Jul 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants