Skip to content

Write a module to a temporary file that no scan takes for a module - #734

Merged
lagergren merged 1 commit into
masterfrom
lagergren/fix-module-temp-file
Oct 27, 2026
Merged

lagergren merged 1 commit into
masterfrom
lagergren/fix-module-temp-file

Conversation

@lagergren

Copy link
Copy Markdown
Contributor

FileRepository.storeModule wrote a module to tmp.<module><random>.xtc next to its file, then renamed it. If the process was killed while writing, as a killed build is, the partial file stayed behind, named like a module:

  • DirRepository's scan takes every *.xtc in its directory (DirRepository.java:433), so a later compile with that directory on its module path would read the partial file as a module.
  • On lagergren/errs, the language server bundles every *.xtc of the XDK's library directories. After a killed Linux test run, its bundle listed tmp.xml.xtclang.org<random>.xtc, and the server failed to start with an EOFException reading it, until clean.

The temporary file is now <file name><random>.tmp, as DirRepository names its own cache's.

Validation

  • The XDK builds with the change: every library's compileXtc ran and wrote its module this way, and no temporary file was left.
  • BundlerTest (9) and DirRepositoryConcurrentScanTest (1) pass.
  • On lagergren/errs, with the same change, the full lsp-server suite passes (2401 tests, the 2 skipped as always).

Limits

  • A killed write still leaves its temporary file behind, now named *.tmp, which no build or scan takes for a module; clean removes it.
  • No test kills a process while it writes.

FileRepository.storeModule wrote a module to tmp.<module><random>.xtc
next to its file and renamed it when done. When the process was killed
while writing, as a killed build is, the partial file stayed, named
like a module. DirRepository's scan takes every *.xtc in its
directory, so a later compile with that directory on its module path
would read the partial file as a module. On lagergren/errs, the
language server bundles every *.xtc of the XDK's library directories;
its bundle listed tmp.xml.xtclang.org<random>.xtc, and the server
failed to start with an EOFException reading it, until clean.

The temporary file is now <file name><random>.tmp, as DirRepository
names its own.

Validation: the XDK built with the change (every library's compileXtc
ran and wrote its module this way), and no temporary file was left.
BundlerTest (9) and DirRepositoryConcurrentScanTest (1) pass.

Problems found and fixed: found on lagergren/errs when a Linux test
run was killed while the XDK built; the next run's lsp-server tests
could not start.

Limits: a killed write still leaves its temporary file behind, now
named *.tmp, which no build or scan takes for a module; clean removes
it. No test kills a process while it writes.
@lagergren
lagergren requested review from cpurdy and ggleyzer October 27, 2026 09:05
@lagergren
lagergren merged commit 4970ce1 into master Oct 27, 2026
5 checks passed
@lagergren
lagergren deleted the lagergren/fix-module-temp-file branch October 27, 2026 14:55
lagergren added a commit that referenced this pull request Oct 28, 2026
…mmit went

errs-rebase-2026-10-28.tsv maps errs' 1128 commits to their 1126
replays; master absorbed the two that landed as #717 and #734.
errs-693-rebase-2026-10-28.tsv maps the regroup's 70 #693 commits to the
rebased 71. The plan's entry gives the eight conflicts and how each was
resolved, the two commits that follow the replays (#716's review
changes and the caller's javadoc for Runtime's debugger accessors, #742
on master), and the receipts.

Validation: errs' tree equals a merge of master and the old tip, with
Runtime.java and EmbeddingSupportTest's imports resolved as recorded.
spotlessCheck and :lang:spotlessCheck; :javatools:test 695, 0 failures,
42 skipped; :javatools_utils:test 122 (2 skipped);
:lang:dap-server:test 38; :lang:lsp-server:test 2,420 (2 skipped);
compilerStdioTest 83; :lang:intellij-plugin:test 151.
lagergren added a commit that referenced this pull request Oct 28, 2026
…mmit went

errs-rebase-2026-10-28.tsv maps errs' 1128 commits to their 1126
replays; master absorbed the two that landed as #717 and #734.
errs-693-rebase-2026-10-28.tsv maps the regroup's 70 #693 commits to the
rebased 71. The plan's entry gives the eight conflicts and how each was
resolved, the two commits that follow the replays (#716's review
changes and the caller's javadoc for Runtime's debugger accessors, #742
on master), and the receipts.

Validation: errs' tree equals a merge of master and the old tip, with
Runtime.java and EmbeddingSupportTest's imports resolved as recorded.
spotlessCheck and :lang:spotlessCheck; :javatools:test 695, 0 failures,
42 skipped; :javatools_utils:test 122 (2 skipped);
:lang:dap-server:test 38; :lang:lsp-server:test 2,420 (2 skipped);
compilerStdioTest 83; :lang:intellij-plugin:test 151.
lagergren added a commit that referenced this pull request Oct 29, 2026
…mmit went

errs-rebase-2026-10-28.tsv maps errs' 1128 commits to their 1126
replays; master absorbed the two that landed as #717 and #734.
errs-693-rebase-2026-10-28.tsv maps the regroup's 70 #693 commits to the
rebased 71. The plan's entry gives the eight conflicts and how each was
resolved, the two commits that follow the replays (#716's review
changes and the caller's javadoc for Runtime's debugger accessors, #742
on master), and the receipts.

Validation: errs' tree equals a merge of master and the old tip, with
Runtime.java and EmbeddingSupportTest's imports resolved as recorded.
spotlessCheck and :lang:spotlessCheck; :javatools:test 695, 0 failures,
42 skipped; :javatools_utils:test 122 (2 skipped);
:lang:dap-server:test 38; :lang:lsp-server:test 2,420 (2 skipped);
compilerStdioTest 83; :lang:intellij-plugin:test 151.
lagergren added a commit that referenced this pull request Oct 29, 2026
…mmit went

errs-rebase-2026-10-28.tsv maps errs' 1128 commits to their 1126
replays; master absorbed the two that landed as #717 and #734.
errs-693-rebase-2026-10-28.tsv maps the regroup's 70 #693 commits to the
rebased 71. The plan's entry gives the eight conflicts and how each was
resolved, the two commits that follow the replays (#716's review
changes and the caller's javadoc for Runtime's debugger accessors, #742
on master), and the receipts.

Validation: errs' tree equals a merge of master and the old tip, with
Runtime.java and EmbeddingSupportTest's imports resolved as recorded.
spotlessCheck and :lang:spotlessCheck; :javatools:test 695, 0 failures,
42 skipped; :javatools_utils:test 122 (2 skipped);
:lang:dap-server:test 38; :lang:lsp-server:test 2,420 (2 skipped);
compilerStdioTest 83; :lang:intellij-plugin:test 151.
lagergren added a commit that referenced this pull request Oct 29, 2026
…mmit went

errs-rebase-2026-10-28.tsv maps errs' 1128 commits to their 1126
replays; master absorbed the two that landed as #717 and #734.
errs-693-rebase-2026-10-28.tsv maps the regroup's 70 #693 commits to the
rebased 71. The plan's entry gives the eight conflicts and how each was
resolved, the two commits that follow the replays (#716's review
changes and the caller's javadoc for Runtime's debugger accessors, #742
on master), and the receipts.

Validation: errs' tree equals a merge of master and the old tip, with
Runtime.java and EmbeddingSupportTest's imports resolved as recorded.
spotlessCheck and :lang:spotlessCheck; :javatools:test 695, 0 failures,
42 skipped; :javatools_utils:test 122 (2 skipped);
:lang:dap-server:test 38; :lang:lsp-server:test 2,420 (2 skipped);
compilerStdioTest 83; :lang:intellij-plugin:test 151.
lagergren added a commit that referenced this pull request Nov 2, 2026
…mmit went

errs-rebase-2026-10-28.tsv maps errs' 1128 commits to their 1126
replays; master absorbed the two that landed as #717 and #734.
errs-693-rebase-2026-10-28.tsv maps the regroup's 70 #693 commits to the
rebased 71. The plan's entry gives the eight conflicts and how each was
resolved, the two commits that follow the replays (#716's review
changes and the caller's javadoc for Runtime's debugger accessors, #742
on master), and the receipts.

Validation: errs' tree equals a merge of master and the old tip, with
Runtime.java and EmbeddingSupportTest's imports resolved as recorded.
spotlessCheck and :lang:spotlessCheck; :javatools:test 695, 0 failures,
42 skipped; :javatools_utils:test 122 (2 skipped);
:lang:dap-server:test 38; :lang:lsp-server:test 2,420 (2 skipped);
compilerStdioTest 83; :lang:intellij-plugin:test 151.
lagergren added a commit that referenced this pull request Nov 4, 2026
…mmit went

errs-rebase-2026-10-28.tsv maps errs' 1128 commits to their 1126
replays; master absorbed the two that landed as #717 and #734.
errs-693-rebase-2026-10-28.tsv maps the regroup's 70 #693 commits to the
rebased 71. The plan's entry gives the eight conflicts and how each was
resolved, the two commits that follow the replays (#716's review
changes and the caller's javadoc for Runtime's debugger accessors, #742
on master), and the receipts.

Validation: errs' tree equals a merge of master and the old tip, with
Runtime.java and EmbeddingSupportTest's imports resolved as recorded.
spotlessCheck and :lang:spotlessCheck; :javatools:test 695, 0 failures,
42 skipped; :javatools_utils:test 122 (2 skipped);
:lang:dap-server:test 38; :lang:lsp-server:test 2,420 (2 skipped);
compilerStdioTest 83; :lang:intellij-plugin:test 151.
lagergren added a commit that referenced this pull request Nov 5, 2026
…mmit went

errs-rebase-2026-10-28.tsv maps errs' 1128 commits to their 1126
replays; master absorbed the two that landed as #717 and #734.
errs-693-rebase-2026-10-28.tsv maps the regroup's 70 #693 commits to the
rebased 71. The plan's entry gives the eight conflicts and how each was
resolved, the two commits that follow the replays (#716's review
changes and the caller's javadoc for Runtime's debugger accessors, #742
on master), and the receipts.

Validation: errs' tree equals a merge of master and the old tip, with
Runtime.java and EmbeddingSupportTest's imports resolved as recorded.
spotlessCheck and :lang:spotlessCheck; :javatools:test 695, 0 failures,
42 skipped; :javatools_utils:test 122 (2 skipped);
:lang:dap-server:test 38; :lang:lsp-server:test 2,420 (2 skipped);
compilerStdioTest 83; :lang:intellij-plugin:test 151.
lagergren added a commit that referenced this pull request Nov 9, 2026
…mmit went

errs-rebase-2026-10-28.tsv maps errs' 1128 commits to their 1126
replays; master absorbed the two that landed as #717 and #734.
errs-693-rebase-2026-10-28.tsv maps the regroup's 70 #693 commits to the
rebased 71. The plan's entry gives the eight conflicts and how each was
resolved, the two commits that follow the replays (#716's review
changes and the caller's javadoc for Runtime's debugger accessors, #742
on master), and the receipts.

Validation: errs' tree equals a merge of master and the old tip, with
Runtime.java and EmbeddingSupportTest's imports resolved as recorded.
spotlessCheck and :lang:spotlessCheck; :javatools:test 695, 0 failures,
42 skipped; :javatools_utils:test 122 (2 skipped);
:lang:dap-server:test 38; :lang:lsp-server:test 2,420 (2 skipped);
compilerStdioTest 83; :lang:intellij-plugin:test 151.
lagergren added a commit that referenced this pull request Nov 11, 2026
…mmit went

errs-rebase-2026-10-28.tsv maps errs' 1128 commits to their 1126
replays; master absorbed the two that landed as #717 and #734.
errs-693-rebase-2026-10-28.tsv maps the regroup's 70 #693 commits to the
rebased 71. The plan's entry gives the eight conflicts and how each was
resolved, the two commits that follow the replays (#716's review
changes and the caller's javadoc for Runtime's debugger accessors, #742
on master), and the receipts.

Validation: errs' tree equals a merge of master and the old tip, with
Runtime.java and EmbeddingSupportTest's imports resolved as recorded.
spotlessCheck and :lang:spotlessCheck; :javatools:test 695, 0 failures,
42 skipped; :javatools_utils:test 122 (2 skipped);
:lang:dap-server:test 38; :lang:lsp-server:test 2,420 (2 skipped);
compilerStdioTest 83; :lang:intellij-plugin:test 151.
lagergren added a commit that referenced this pull request Nov 22, 2026
…mmit went

errs-rebase-2026-10-28.tsv maps errs' 1128 commits to their 1126
replays; master absorbed the two that landed as #717 and #734.
errs-693-rebase-2026-10-28.tsv maps the regroup's 70 #693 commits to the
rebased 71. The plan's entry gives the eight conflicts and how each was
resolved, the two commits that follow the replays (#716's review
changes and the caller's javadoc for Runtime's debugger accessors, #742
on master), and the receipts.

Validation: errs' tree equals a merge of master and the old tip, with
Runtime.java and EmbeddingSupportTest's imports resolved as recorded.
spotlessCheck and :lang:spotlessCheck; :javatools:test 695, 0 failures,
42 skipped; :javatools_utils:test 122 (2 skipped);
:lang:dap-server:test 38; :lang:lsp-server:test 2,420 (2 skipped);
compilerStdioTest 83; :lang:intellij-plugin:test 151.
lagergren added a commit that referenced this pull request Nov 25, 2026
…mmit went

errs-rebase-2026-10-28.tsv maps errs' 1128 commits to their 1126
replays; master absorbed the two that landed as #717 and #734.
errs-693-rebase-2026-10-28.tsv maps the regroup's 70 #693 commits to the
rebased 71. The plan's entry gives the eight conflicts and how each was
resolved, the two commits that follow the replays (#716's review
changes and the caller's javadoc for Runtime's debugger accessors, #742
on master), and the receipts.

Validation: errs' tree equals a merge of master and the old tip, with
Runtime.java and EmbeddingSupportTest's imports resolved as recorded.
spotlessCheck and :lang:spotlessCheck; :javatools:test 695, 0 failures,
42 skipped; :javatools_utils:test 122 (2 skipped);
:lang:dap-server:test 38; :lang:lsp-server:test 2,420 (2 skipped);
compilerStdioTest 83; :lang:intellij-plugin:test 151.
lagergren added a commit that referenced this pull request Nov 25, 2026
…mmit went

errs-rebase-2026-10-28.tsv maps errs' 1128 commits to their 1126
replays; master absorbed the two that landed as #717 and #734.
errs-693-rebase-2026-10-28.tsv maps the regroup's 70 #693 commits to the
rebased 71. The plan's entry gives the eight conflicts and how each was
resolved, the two commits that follow the replays (#716's review
changes and the caller's javadoc for Runtime's debugger accessors, #742
on master), and the receipts.

Validation: errs' tree equals a merge of master and the old tip, with
Runtime.java and EmbeddingSupportTest's imports resolved as recorded.
spotlessCheck and :lang:spotlessCheck; :javatools:test 695, 0 failures,
42 skipped; :javatools_utils:test 122 (2 skipped);
:lang:dap-server:test 38; :lang:lsp-server:test 2,420 (2 skipped);
compilerStdioTest 83; :lang:intellij-plugin:test 151.
lagergren added a commit that referenced this pull request Nov 25, 2026
…mmit went

errs-rebase-2026-10-28.tsv maps errs' 1128 commits to their 1126
replays; master absorbed the two that landed as #717 and #734.
errs-693-rebase-2026-10-28.tsv maps the regroup's 70 #693 commits to the
rebased 71. The plan's entry gives the eight conflicts and how each was
resolved, the two commits that follow the replays (#716's review
changes and the caller's javadoc for Runtime's debugger accessors, #742
on master), and the receipts.

Validation: errs' tree equals a merge of master and the old tip, with
Runtime.java and EmbeddingSupportTest's imports resolved as recorded.
spotlessCheck and :lang:spotlessCheck; :javatools:test 695, 0 failures,
42 skipped; :javatools_utils:test 122 (2 skipped);
:lang:dap-server:test 38; :lang:lsp-server:test 2,420 (2 skipped);
compilerStdioTest 83; :lang:intellij-plugin:test 151.
lagergren added a commit that referenced this pull request Nov 26, 2026
…mmit went

errs-rebase-2026-10-28.tsv maps errs' 1128 commits to their 1126
replays; master absorbed the two that landed as #717 and #734.
errs-693-rebase-2026-10-28.tsv maps the regroup's 70 #693 commits to the
rebased 71. The plan's entry gives the eight conflicts and how each was
resolved, the two commits that follow the replays (#716's review
changes and the caller's javadoc for Runtime's debugger accessors, #742
on master), and the receipts.

Validation: errs' tree equals a merge of master and the old tip, with
Runtime.java and EmbeddingSupportTest's imports resolved as recorded.
spotlessCheck and :lang:spotlessCheck; :javatools:test 695, 0 failures,
42 skipped; :javatools_utils:test 122 (2 skipped);
:lang:dap-server:test 38; :lang:lsp-server:test 2,420 (2 skipped);
compilerStdioTest 83; :lang:intellij-plugin:test 151.
lagergren added a commit that referenced this pull request Nov 26, 2026
…mmit went

errs-rebase-2026-10-28.tsv maps errs' 1128 commits to their 1126
replays; master absorbed the two that landed as #717 and #734.
errs-693-rebase-2026-10-28.tsv maps the regroup's 70 #693 commits to the
rebased 71. The plan's entry gives the eight conflicts and how each was
resolved, the two commits that follow the replays (#716's review
changes and the caller's javadoc for Runtime's debugger accessors, #742
on master), and the receipts.

Validation: errs' tree equals a merge of master and the old tip, with
Runtime.java and EmbeddingSupportTest's imports resolved as recorded.
spotlessCheck and :lang:spotlessCheck; :javatools:test 695, 0 failures,
42 skipped; :javatools_utils:test 122 (2 skipped);
:lang:dap-server:test 38; :lang:lsp-server:test 2,420 (2 skipped);
compilerStdioTest 83; :lang:intellij-plugin:test 151.
lagergren added a commit that referenced this pull request Nov 27, 2026
…mmit went

errs-rebase-2026-10-28.tsv maps errs' 1128 commits to their 1126
replays; master absorbed the two that landed as #717 and #734.
errs-693-rebase-2026-10-28.tsv maps the regroup's 70 #693 commits to the
rebased 71. The plan's entry gives the eight conflicts and how each was
resolved, the two commits that follow the replays (#716's review
changes and the caller's javadoc for Runtime's debugger accessors, #742
on master), and the receipts.

Validation: errs' tree equals a merge of master and the old tip, with
Runtime.java and EmbeddingSupportTest's imports resolved as recorded.
spotlessCheck and :lang:spotlessCheck; :javatools:test 695, 0 failures,
42 skipped; :javatools_utils:test 122 (2 skipped);
:lang:dap-server:test 38; :lang:lsp-server:test 2,420 (2 skipped);
compilerStdioTest 83; :lang:intellij-plugin:test 151.
lagergren added a commit that referenced this pull request Nov 28, 2026
…mmit went

errs-rebase-2026-10-28.tsv maps errs' 1128 commits to their 1126
replays; master absorbed the two that landed as #717 and #734.
errs-693-rebase-2026-10-28.tsv maps the regroup's 70 #693 commits to the
rebased 71. The plan's entry gives the eight conflicts and how each was
resolved, the two commits that follow the replays (#716's review
changes and the caller's javadoc for Runtime's debugger accessors, #742
on master), and the receipts.

Validation: errs' tree equals a merge of master and the old tip, with
Runtime.java and EmbeddingSupportTest's imports resolved as recorded.
spotlessCheck and :lang:spotlessCheck; :javatools:test 695, 0 failures,
42 skipped; :javatools_utils:test 122 (2 skipped);
:lang:dap-server:test 38; :lang:lsp-server:test 2,420 (2 skipped);
compilerStdioTest 83; :lang:intellij-plugin:test 151.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants