Skip to content

Insert and remove quotes around pathing for debugger where appropriat…#1277

Draft
JeremyYao wants to merge 1 commit intoapache:mainfrom
ctc-oss:jy/1075
Draft

Insert and remove quotes around pathing for debugger where appropriat…#1277
JeremyYao wants to merge 1 commit intoapache:mainfrom
ctc-oss:jy/1075

Conversation

@JeremyYao
Copy link
Collaborator

@JeremyYao JeremyYao commented May 28, 2025

…e to handle folder names w/ spaces

Closes #1075

Description

See #1075

Wiki

  • I have determined that no documentation updates are needed for these changes
    • This is developer-related only. No need to inform users about this.
  • I have added following documentation for these changes

Review Instructions including Screenshots

[Add review instructions including screenshots or GIFs to help explain the change visually.]

sampleWorkspace: sampleWorkspace.zip

Verifying Functionality While Debugging the Extension

  1. Clone the jy/1075 branch onto your machine where a space exists in the path. Example: C:\Users\jeremy.yao\repos\space test\daffodil-vscode-ctc>

  2. Copy the sampleWorkspace contents into the same folder where the is a space in the path. Example: C:\Users\jeremy.yao\repos\space test\sampleWorkspace

  3. Debug the extension as normal
    image

  4. Run the jpeg launch.json configuration and verify that debugging went as expected.
    image

  5. You may want to run jpeg again but also have the following be set to true in launch.json

            "openDataEditor": true,
            "openInfosetView": true,
            "openInfosetDiffView": true,
  1. Verify the data editor and the two infoset views open up.
  2. As a regression test, perform steps 1 - 6, but reclone the branch and the sampleWorkspace folder into a path without any spaces. Example: C:\Users\jeremy.yao\repos

Verifying Functionality with Packaged Extension

  1. Package the extension via yarn package and install it into VSCode

  2. Copy the sampleWorkspace contents into a folder where the is a space in the path. Example: C:\Users\jeremy.yao\repos\space test\sampleWorkspace

  3. Run the jpeg launch.json configuration and verify that debugging went as expected.
    image

  4. You may want to run jpeg again but also have the following be set to true in launch.json

            "openDataEditor": true,
            "openInfosetView": true,
            "openInfosetDiffView": true,
  1. Verify the data editor and the two infoset views open up.

@JeremyYao JeremyYao self-assigned this May 28, 2025
@JeremyYao JeremyYao added bug Something isn't working debugger Issues related to the DFDL debugger capability labels May 28, 2025
@JeremyYao
Copy link
Collaborator Author

OmegaEdit server seems to be hanging when starting on my end (Windows 10). Can anyone else confirm they are seeing the same issue.

@JeremyYao
Copy link
Collaborator Author

JeremyYao commented May 28, 2025

OmegaEdit server seems to be hanging when starting on my end (Windows 10). Can anyone else confirm they are seeing the same issue.

Did some debugging and the extension seems to be hanging on this line in dataEditorClient.ts

// Start the server and wait up to 10 seconds for it to start
  const serverPid = (await Promise.race([
    startServer(
      omegaEditPort,
      OMEGA_EDIT_HOST,
      getPidFile(omegaEditPort),
      logConfigFile
    ),
    new Promise((_resolve, reject) => {
      setTimeout(() => {
        reject((): Error => {
          return new Error(
            `Server startup timed out after ${SERVER_START_TIMEOUT} seconds`
          )
        })
      }, SERVER_START_TIMEOUT * 1000)
    }),
  ])) as number | undefined

The timeout doesn't seem to be hitting nor getting past this line even though there's a timeout promise set as the second promise.

@JeremyYao JeremyYao marked this pull request as draft May 28, 2025 16:33
@hdalsania hdalsania added this to the 1.4.2 milestone May 29, 2025
@hdalsania hdalsania moved this to In Progress in daffodil-vscode v1.5.0 May 29, 2025
@JeremyYao
Copy link
Collaborator Author

Re-tested on a windows VM and OmegaEdit is still hanging.
image

@JeremyYao
Copy link
Collaborator Author

The data editor when opening it not through a debugging session also hangs.

@JeremyYao JeremyYao force-pushed the jy/1075 branch 2 times, most recently from 2d36759 to 7de6c11 Compare June 18, 2025 13:49
@JeremyYao
Copy link
Collaborator Author

JeremyYao commented Jun 18, 2025

Something I found, there doesn't seem to be a .pid or a .log file that exists in C:\Users<USER_NAME>\AppData\Roaming\xdg.data\omega_edit

image

The results for 9090 that were generated were from trying to open the data editor in a extension debugging session where the path to the repository doesn't contain a space. The results for 9069 were from an extension debugging session where the path to the repo contains a space.

@JeremyYao
Copy link
Collaborator Author

I'm not running into any issues on Ubuntu 24.04

@JeremyYao
Copy link
Collaborator Author

Upgraded omegaedit to 0.9.88 to see if issues are resolved. It's still throwing an error on the startServer() call as referenced in #1277 (comment).

@JeremyYao
Copy link
Collaborator Author

Log file contents:

{"level":"DEBUG","time":"2025-06-23T13:26:15.577Z","pid":16400,"hostname":"REDACTED","fn":"setLogger","msg":"logger set"}
{"level":"DEBUG","time":"2025-06-23T13:26:27.479Z","pid":16400,"hostname":"REDACTED","fn":"startServer","host":"127.0.0.1","port":9069,"pidFile":"C:\\Users\\USERNAME\\AppData\\Roaming\\xdg.data\\omega_edit\\serv-9069.pid","logConf":"C:\\Users\\USERNAME\\AppData\\Roaming\\xdg.data\\omega_edit\\serv-9069.logconf.xml"}
{"level":"DEBUG","time":"2025-06-23T13:26:28.112Z","pid":16400,"hostname":"REDACTED","fn":"isPortAvailable","host":"127.0.0.1","port":9069}
{"level":"DEBUG","time":"2025-06-23T13:26:28.113Z","pid":16400,"hostname":"REDACTED","fn":"isPortAvailable","host":"127.0.0.1","port":9069,"avail":true}
{"level":"DEBUG","time":"2025-06-23T13:26:28.118Z","pid":16400,"hostname":"REDACTED","fn":"startServer","host":"127.0.0.1","port":9069,"pidFile":"C:\\Users\\USERNAME\\AppData\\Roaming\\xdg.data\\omega_edit\\serv-9069.pid","logConf":"C:\\Users\\USERNAME\\AppData\\Roaming\\xdg.data\\omega_edit\\serv-9069.logconf.xml","state":"waiting"}

@JeremyYao
Copy link
Collaborator Author

JeremyYao commented Jun 23, 2025

serv-9069.logconf.xml file in C:\Users\USERNAME\AppData\Roaming\xdg.data\omega_edit looks like

<?xml version="1.0" encoding="UTF-8"?>

<configuration>
    <appender name="FILE" class="ch.qos.logback.core.FileAppender">
        <file>C:\Users\USERNAME\AppData\Roaming\xdg.data\omega_edit\serv-9069.log</file>
        <encoder>
            <pattern>[%date{ISO8601}] [%level] [%logger] [%marker] [%thread] - %msg MDC: {%mdc}%n</pattern>
        </encoder>
    </appender>
    <root level="INFO">
        <appender-ref ref="FILE" />
    </root>
</configuration>

@JeremyYao
Copy link
Collaborator Author

JeremyYao commented Jun 23, 2025

Changing the bottom half of serverSTart() to

try {
    const serverPid = await startServer(
      omegaEditPort,
      OMEGA_EDIT_HOST,
      getPidFile(omegaEditPort),
      logConfigFile
    )

    clearInterval(animationIntervalId)
    if (serverPid === undefined || serverPid <= 0) {
      statusBarItem.dispose()
      throw new Error('Server failed to start or PID is invalid')
    }
    // this makes sure the server if fully online and ready to take requests
    statusBarItem.text = `Initializing Ωedit server on port ${omegaEditPort}`
    for (let i = 1; i <= 60; ++i) {
      try {
        await getServerInfo()
        break
      } catch (err) {
        statusBarItem.text = `Initializing Ωedit server on port ${omegaEditPort} (${i}/60)`
      }
      // wait 1 second before trying again
      await new Promise((resolve) => {
        setTimeout(() => {
          resolve(true)
        }, 1000)
      })
    }
    try {
      serverInfo = await getServerInfo()
    } catch (err) {
      statusBarItem.dispose()
      await serverStop()
      throw new Error('Server failed to initialize')
    }
    statusBarItem.text = `Ωedit server on port ${omegaEditPort} initialized`
    const serverVersion = serverInfo.serverVersion
    // if the OS is not Windows, check that the server PID matches the one started
    // NOTE: serverPid is the PID of the server wrapper script on Windows
    if (
      !os.platform().toLowerCase().startsWith('win') &&
      serverInfo.serverProcessId !== serverPid
    ) {
      statusBarItem.dispose()
      throw new Error(
        `server PID mismatch ${serverInfo.serverProcessId} != ${serverPid}`
      )
    }
    const clientVersion = getClientVersion()
    if (serverVersion !== clientVersion) {
      statusBarItem.dispose()
      throw new Error(
        `Server version ${serverVersion} and client version ${clientVersion} must match`
      )
    }

    statusBarItem.text = `Ωedit server v${serverVersion} ready on port ${omegaEditPort} with PID ${serverInfo.serverProcessId}`
    setTimeout(() => {
      statusBarItem.dispose()
    }, 5000)
  } catch (err) {
    logError(err)
  }

results in the

 const serverPid = await startServer(
      omegaEditPort,
      OMEGA_EDIT_HOST,
      getPidFile(omegaEditPort),
      logConfigFile
    )

call to hang.

@JeremyYao
Copy link
Collaborator Author

Created some test in OmegaEdit: #1024 (comment). Doesn't seem to have the hanging issue. It may be a VS-Code specific thing

@scholarsmate
Copy link
Contributor

Something I found, there doesn't seem to be a .pid or a .log file that exists in C:\Users<USER_NAME>\AppData\Roaming\xdg.data\omega_edit

image

The results for 9090 that were generated were from trying to open the data editor in a extension debugging session where the path to the repository doesn't contain a space. The results for 9069 were from an extension debugging session where the path to the repo contains a space.

The .xml file is for configuring the Ωedit server-side logger(e.g., the configured log level for the Ωedit server).

@JeremyYao
Copy link
Collaborator Author

JeremyYao commented Aug 19, 2025

From conversation with on Friday 8.15.2025, @scholarsmate mentioned he will work on the OmegaEdit side as well as put out a release for OmegaEdit too. Potentially after this, will make a PR on the extension side too.

The overall work so far to this ticket is seeing if we can expose the underlying Typescript code as we're debugging the extension's library/node package calls instead of compiled webpack code.

@scholarsmate scholarsmate marked this pull request as ready for review September 15, 2025 18:47
@scholarsmate
Copy link
Contributor

@JeremyYao, @stricklandrbls merged a nice linking feature into Ωedit that will allow you to easily install Ωedit into your VSCode extension repo along with the debug mappings. With the tests in the Ωedit client working fine with abnormal filenames, my suspicion is when we call java that we're loosing those quotes so the command is being broken.

@JeremyYao
Copy link
Collaborator Author

@JeremyYao, @stricklandrbls merged a nice linking feature into Ωedit that will allow you to easily install Ωedit into your VSCode extension repo along with the debug mappings. With the tests in the Ωedit client working fine with abnormal filenames, my suspicion is when we call java that we're loosing those quotes so the command is being broken.

This is good info! Thanks for the heads up regarding the linking feature in OmegaEdit.

@shanedell
Copy link
Contributor

@JeremyYao Can you just update the PR description to make the template so that it will pass the CI? I will give this a test and approve if everything works as expected.

@JeremyYao JeremyYao force-pushed the jy/1075 branch 2 times, most recently from 71cbd54 to 33d069e Compare September 17, 2025 17:56
@JeremyYao
Copy link
Collaborator Author

@JeremyYao Can you just update the PR description to make the template so that it will pass the CI? I will give this a test and approve if everything works as expected.

Updated PR description to fit template

@JeremyYao
Copy link
Collaborator Author

JeremyYao commented Sep 17, 2025

@hdalsania, re-tested this PR on Windows 10. Running a debugging session appears to work fine and you are able to generate an infoset. Attempting to open the data editor via command pallete still results in the following error being displayed.

The dataEditor log file looks like this:

{"level":"DEBUG","time":"2025-09-17T19:05:10.923Z","pid":32144,"hostname":"NTEL00612L","fn":"setLogger","msg":"logger set"}
{"level":"DEBUG","time":"2025-09-17T19:05:10.927Z","pid":32144,"hostname":"NTEL00612L","fn":"startServer","host":"127.0.0.1","port":9069,"pidFile":"C:\\Users\\USERNAME\\AppData\\Roaming\\xdg.data\\omega_edit\\serv-9069.pid","logConf":"C:\\Users\\USERNAME\\AppData\\Roaming\\xdg.data\\omega_edit\\serv-9069.logconf.xml"}
{"level":"DEBUG","time":"2025-09-17T19:05:10.929Z","pid":32144,"hostname":"NTEL00612L","fn":"isPortAvailable","host":"127.0.0.1","port":9069}
{"level":"DEBUG","time":"2025-09-17T19:05:10.931Z","pid":32144,"hostname":"NTEL00612L","fn":"isPortAvailable","host":"127.0.0.1","port":9069,"avail":true}
{"level":"DEBUG","time":"2025-09-17T19:05:10.939Z","pid":32144,"hostname":"NTEL00612L","fn":"startServer","host":"127.0.0.1","port":9069,"pidFile":"C:\\Users\\USERNAME\\AppData\\Roaming\\xdg.data\\omega_edit\\serv-9069.pid","logConf":"C:\\Users\\USERNAME\\AppData\\Roaming\\xdg.data\\omega_edit\\serv-9069.logconf.xml","state":"waiting"}

image

Additionally, the latest version of OmegaEdit is 0.9.88 per https://github.com/ctc-oss/omega-edit/releases and testing it w/ this version still results in the Data Editor not opening and hanging on the bottom

@JeremyYao
Copy link
Collaborator Author

Currently struggling w/ installing and getting omega edit to package on windows before getting to the linking script. See the following output.

PS C:\Users\Administrator\repos\i love spaces\omega-edit> yarn workspace @omega-edit/server package
yarn workspace v1.22.22
yarn run v1.22.22
$ yarn prepare && yarn pack -f omega-edit-node-server-v${npm_package_version}.tgz
$ yarn sbt-server && yarn build
$ cd ../../server/scala && sbt pkgServer
[info] welcome to sbt 1.10.11 (Oracle Corporation Java 17.0.12)
[info] loading settings for project scala-build from plugins.sbt...
[info] loading project definition from C:\Users\Administrator\repos\i love spaces\omega-edit\server\scala\project
[info] compiling 2 Scala sources to C:\Users\Administrator\repos\i love spaces\omega-edit\server\scala\project\target\scala-2.12\sbt-1.0\classes ...
[info] loading settings for project omega-edit from build.sbt...
[info] set current project to omega-edit (in build file:/C:/Users/Administrator/repos/i%20love%20spaces/omega-edit/server/scala/)
[success] Total time: 1 s, completed Sep 22, 2025, 6:06:23 PM
[info] Wrote C:\Users\Administrator\repos\i love spaces\omega-edit\server\scala\serv\target\scala-2.13\omega-edit-grpc-server_2.13-0.9.88.pom
[info] Updating omega-edit_2.13
[info] Resolved omega-edit_2.13 dependencies
[warn]
[warn]  Note: Unresolved dependencies path:
[error] sbt.librarymanagement.ResolveException: Error downloading com.ctc:omega-edit-native_2.13:0.9.88
[error]   Not found
[error]   Not found
[error]   not found: C:\Users\Administrator\.ivy2\localcom.ctc\omega-edit-native_2.13\0.9.88\ivys\ivy.xml
[error]   not found: https://repo1.maven.org/maven2/com/ctc/omega-edit-native_2.13/0.9.88/omega-edit-native_2.13-0.9.88.pom
[error]   unauthorized: https://maven.pkg.github.com/ctc-oss/omega-edit/com/ctc/omega-edit-native_2.13/0.9.88/omega-edit-native_2.13-0.9.88.pom
[error]   not found: C:\Users\Administrator\.m2\repository\com\ctc\omega-edit-native_2.13\0.9.88\omega-edit-native_2.13-0.9.88.pom
[error]         at lmcoursier.CoursierDependencyResolution.unresolvedWarningOrThrow(CoursierDependencyResolution.scala:347)
[error]         at lmcoursier.CoursierDependencyResolution.$anonfun$update$39(CoursierDependencyResolution.scala:316)
[error]         at scala.util.Either$LeftProjection.map(Either.scala:573)
[error]         at lmcoursier.CoursierDependencyResolution.update(CoursierDependencyResolution.scala:316)
[error]         at sbt.librarymanagement.DependencyResolution.update(DependencyResolution.scala:60)
[error]         at sbt.internal.LibraryManagement$.resolve$1(LibraryManagement.scala:60)
[error]         at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$12(LibraryManagement.scala:142)
[error]         at sbt.util.Tracked$.$anonfun$lastOutput$1(Tracked.scala:74)
[error]         at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$11(LibraryManagement.scala:144)
[error]         at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$11$adapted(LibraryManagement.scala:131)
[error]         at sbt.util.Tracked$.$anonfun$inputChangedW$1(Tracked.scala:220)
[error]         at sbt.internal.LibraryManagement$.cachedUpdate(LibraryManagement.scala:169)
[error]         at sbt.Classpaths$.$anonfun$updateTask0$1(Defaults.scala:3941)
[error]         at scala.Function1.$anonfun$compose$1(Function1.scala:49)
[error]         at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:63)
[error]         at sbt.std.Transform$$anon$4.work(Transform.scala:69)
[error]         at sbt.Execute.$anonfun$submit$2(Execute.scala:283)
[error]         at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:24)
[error]         at sbt.Execute.work(Execute.scala:292)
[error]         at sbt.Execute.$anonfun$submit$1(Execute.scala:283)
[error]         at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265)
[error]         at sbt.CompletionService$$anon$2.call(CompletionService.scala:65)
[error]         at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error]         at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
[error]         at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error]         at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
[error]         at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
[error]         at java.base/java.lang.Thread.run(Thread.java:842)
[error] (api / update) sbt.librarymanagement.ResolveException: Error downloading com.ctc:omega-edit-native_2.13:0.9.88
[error]   Not found
[error]   Not found
[error]   not found: C:\Users\Administrator\.ivy2\localcom.ctc\omega-edit-native_2.13\0.9.88\ivys\ivy.xml
[error]   not found: https://repo1.maven.org/maven2/com/ctc/omega-edit-native_2.13/0.9.88/omega-edit-native_2.13-0.9.88.pom
[error]   unauthorized: https://maven.pkg.github.com/ctc-oss/omega-edit/com/ctc/omega-edit-native_2.13/0.9.88/omega-edit-native_2.13-0.9.88.pom
[error]   not found: C:\Users\Administrator\.m2\repository\com\ctc\omega-edit-native_2.13\0.9.88\omega-edit-native_2.13-0.9.88.pom
[error] Total time: 4 s, completed Sep 22, 2025, 6:06:27 PM
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed.
Exit code: 1
Command: C:\Users\Administrator\AppData\Local\fnm_multishells\9764_1758555808947\node.exe
Arguments: C:\Users\Administrator\AppData\Local\node\corepack\v1\yarn\1.22.22\lib\cli.js package
Directory: C:\Users\Administrator\repos\i love spaces\omega-edit\packages\server
Output:

info Visit https://yarnpkg.com/en/docs/cli/workspace for documentation about this command.
PS C:\Users\Administrator\repos\i love spaces\omega-edit>

@JeremyYao
Copy link
Collaborator Author

Currently struggling w/ installing and getting omega edit to package on windows before getting to the linking script. See the following output.

PS C:\Users\Administrator\repos\i love spaces\omega-edit> yarn workspace @omega-edit/server package
yarn workspace v1.22.22
yarn run v1.22.22
$ yarn prepare && yarn pack -f omega-edit-node-server-v${npm_package_version}.tgz
$ yarn sbt-server && yarn build
$ cd ../../server/scala && sbt pkgServer
[info] welcome to sbt 1.10.11 (Oracle Corporation Java 17.0.12)
[info] loading settings for project scala-build from plugins.sbt...
[info] loading project definition from C:\Users\Administrator\repos\i love spaces\omega-edit\server\scala\project
[info] compiling 2 Scala sources to C:\Users\Administrator\repos\i love spaces\omega-edit\server\scala\project\target\scala-2.12\sbt-1.0\classes ...
[info] loading settings for project omega-edit from build.sbt...
[info] set current project to omega-edit (in build file:/C:/Users/Administrator/repos/i%20love%20spaces/omega-edit/server/scala/)
[success] Total time: 1 s, completed Sep 22, 2025, 6:06:23 PM
[info] Wrote C:\Users\Administrator\repos\i love spaces\omega-edit\server\scala\serv\target\scala-2.13\omega-edit-grpc-server_2.13-0.9.88.pom
[info] Updating omega-edit_2.13
[info] Resolved omega-edit_2.13 dependencies
[warn]
[warn]  Note: Unresolved dependencies path:
[error] sbt.librarymanagement.ResolveException: Error downloading com.ctc:omega-edit-native_2.13:0.9.88
[error]   Not found
[error]   Not found
[error]   not found: C:\Users\Administrator\.ivy2\localcom.ctc\omega-edit-native_2.13\0.9.88\ivys\ivy.xml
[error]   not found: https://repo1.maven.org/maven2/com/ctc/omega-edit-native_2.13/0.9.88/omega-edit-native_2.13-0.9.88.pom
[error]   unauthorized: https://maven.pkg.github.com/ctc-oss/omega-edit/com/ctc/omega-edit-native_2.13/0.9.88/omega-edit-native_2.13-0.9.88.pom
[error]   not found: C:\Users\Administrator\.m2\repository\com\ctc\omega-edit-native_2.13\0.9.88\omega-edit-native_2.13-0.9.88.pom
[error]         at lmcoursier.CoursierDependencyResolution.unresolvedWarningOrThrow(CoursierDependencyResolution.scala:347)
[error]         at lmcoursier.CoursierDependencyResolution.$anonfun$update$39(CoursierDependencyResolution.scala:316)
[error]         at scala.util.Either$LeftProjection.map(Either.scala:573)
[error]         at lmcoursier.CoursierDependencyResolution.update(CoursierDependencyResolution.scala:316)
[error]         at sbt.librarymanagement.DependencyResolution.update(DependencyResolution.scala:60)
[error]         at sbt.internal.LibraryManagement$.resolve$1(LibraryManagement.scala:60)
[error]         at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$12(LibraryManagement.scala:142)
[error]         at sbt.util.Tracked$.$anonfun$lastOutput$1(Tracked.scala:74)
[error]         at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$11(LibraryManagement.scala:144)
[error]         at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$11$adapted(LibraryManagement.scala:131)
[error]         at sbt.util.Tracked$.$anonfun$inputChangedW$1(Tracked.scala:220)
[error]         at sbt.internal.LibraryManagement$.cachedUpdate(LibraryManagement.scala:169)
[error]         at sbt.Classpaths$.$anonfun$updateTask0$1(Defaults.scala:3941)
[error]         at scala.Function1.$anonfun$compose$1(Function1.scala:49)
[error]         at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:63)
[error]         at sbt.std.Transform$$anon$4.work(Transform.scala:69)
[error]         at sbt.Execute.$anonfun$submit$2(Execute.scala:283)
[error]         at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:24)
[error]         at sbt.Execute.work(Execute.scala:292)
[error]         at sbt.Execute.$anonfun$submit$1(Execute.scala:283)
[error]         at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265)
[error]         at sbt.CompletionService$$anon$2.call(CompletionService.scala:65)
[error]         at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error]         at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
[error]         at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error]         at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
[error]         at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
[error]         at java.base/java.lang.Thread.run(Thread.java:842)
[error] (api / update) sbt.librarymanagement.ResolveException: Error downloading com.ctc:omega-edit-native_2.13:0.9.88
[error]   Not found
[error]   Not found
[error]   not found: C:\Users\Administrator\.ivy2\localcom.ctc\omega-edit-native_2.13\0.9.88\ivys\ivy.xml
[error]   not found: https://repo1.maven.org/maven2/com/ctc/omega-edit-native_2.13/0.9.88/omega-edit-native_2.13-0.9.88.pom
[error]   unauthorized: https://maven.pkg.github.com/ctc-oss/omega-edit/com/ctc/omega-edit-native_2.13/0.9.88/omega-edit-native_2.13-0.9.88.pom
[error]   not found: C:\Users\Administrator\.m2\repository\com\ctc\omega-edit-native_2.13\0.9.88\omega-edit-native_2.13-0.9.88.pom
[error] Total time: 4 s, completed Sep 22, 2025, 6:06:27 PM
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed.
Exit code: 1
Command: C:\Users\Administrator\AppData\Local\fnm_multishells\9764_1758555808947\node.exe
Arguments: C:\Users\Administrator\AppData\Local\node\corepack\v1\yarn\1.22.22\lib\cli.js package
Directory: C:\Users\Administrator\repos\i love spaces\omega-edit\packages\server
Output:

info Visit https://yarnpkg.com/en/docs/cli/workspace for documentation about this command.
PS C:\Users\Administrator\repos\i love spaces\omega-edit>

Spoke with @stricklandrbls regarding this issue. From our conversation, he suspects that the sbt build isn't resolving the OE_LIB_DIR variable.

For now, it'll be worth attempting to run the yarn linking script in Omega edit on WSL and see if it can resolve the path to Windows.

@JeremyYao
Copy link
Collaborator Author

I'm attempting to link OmegaEdit on WSL -> W10 repo.

During the process, I ran into an issue with giving the linking script spaces, so I created ctc-oss/omega-edit#1160 and ctc-oss/omega-edit#1161 which addresses ctc-oss/omega-edit#1160.

After getting the linking script to accept the pathing with spaces (I call the linking script via ./build.sh -l /mnt/c/Users/USER/repos/space\ test/daffodil-vscode/), I see that the @omega-edit/client module is not able to be found anymore.

image

@JeremyYao
Copy link
Collaborator Author

From conversation with @hdalsania, this and #1075 will get pushed to next version of Daffodil-VS Code. This is due to this PR and ticket affecting an extremely small, rare use-case for developers on W10 platforms debugging the extension on a path containing a space.

@JeremyYao
Copy link
Collaborator Author

#1075 is easily resolved on the user's end by moving the working directory / repo to a folder and/or path without spaces. The only edge case I can see where this wouldn't work is if the user's username contains a space.

@stricklandrbls
Copy link
Contributor

After getting the linking script to accept the pathing with spaces (I call the linking script via ./build.sh -l /mnt/c/Users/USER/repos/space\ test/daffodil-vscode/), I see that the @omega-edit/client module is not able to be found anymore.

@JeremyYao - I just witnessed this same issue from a completely clean build, install, and link of the Omega Edit packages. However, when I cleaned the repo and tried again it worked fine.

The issue is due to the fact that, at least for me initial attempt, the @omega-edit/client package in the dfdl extension's node_modules did not contain the out output directory which the @omega-edit/client package forwards as the entry point.

As a quick workaround, try removing the @omega-edit/client package in the dfdl extension node_modules. Then in the Omega Edit repo, after a successful build and install via cmake, run:

packages/build.sh -fl <path/to/dfdl/extension>`

The key difference here being the inclusion of the -f (force) option which cleans the yarn cache directory then proceeds to create the OE package links.

@JeremyYao
Copy link
Collaborator Author

JeremyYao commented Oct 2, 2025

As a quick workaround, try removing the @omega-edit/client package in the dfdl extension node_modules. Then in the Omega Edit repo, after a successful build and install via cmake, run:

packages/build.sh -fl <path/to/dfdl/extension>`

The key difference here being the inclusion of the -f (force) option which cleans the yarn cache directory then proceeds to create the OE package links.

I'm still running into the same issue after following the steps.

image

For tracing my steps, I ran

git clean -fdx
cmake -S . -B _build -DCMAKE_BUILD_TYPE=Debug -DBUILD_DOCS=NO -DBUILD_EXAMPLES=NO -DBUILD_SHARED_LIBS=YES
cmake --build _build --config Debug
ctest --build-config Debug --test-dir _build/core --output-on-failure
cmake --install _build --config Debug --prefix _install
yarn install
yarn workspace @omega-edit/server package
yarn workspace @omega-edit/client package
yarn workspace @omega-edit/client test

inside of my Omega Edit repo in WSL

I then ran

git clean -fdx; yarn; yarn package

in the extension repo and then proceeded to remove the node_modules/@omega-edit/client in the extension repo.

Inside of WSL, I did a cd packages, I linked via ./build.sh -fl /mnt/c/Users/jeremy.yao/repos/space\ test/daffodil-vscode-ctc/ after modifying the destination_dir=$1 line to destination_dir=$OPTARG

and then encountered the above screenshot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working debugger Issues related to the DFDL debugger capability

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

Error when path contains folder name with <SPACE> character

5 participants