stevedlawrence commented on a change in pull request #41:
URL: https://github.com/apache/daffodil-vscode/pull/41#discussion_r731971952
##########
File path: src/daffodilDebugger.ts
##########
@@ -104,42 +101,25 @@ export async function getDebugger(config:
vscode.DebugConfiguration) {
// Code for downloading and setting up daffodil-debugger files
if (!fs.existsSync(`${rootPath}/${artifact.name}`)) {
- // Get daffodil-debugger of version entered using http client
- const client = new HttpClient('client') // TODO: supply daffodil
version from config
- const artifactUrl = artifact.archiveUrl(backend)
- const response = await client.get(artifactUrl)
-
- if (response.message.statusCode !== 200) {
- const err: Error = new Error(
- `Couldn't download the Daffodil debugger backend from
${artifactUrl}.`
+ // Get daffodil-debugger zip from extension files
+ const filePath = path
+ .join(
+ context.asAbsolutePath('./server/core/target/universal'),
+ artifact.archive
)
- err['httpStatusCode'] = response.message.statusCode
- throw err
+ .toString()
+
+ // If debugging the extension without vsix installed make sure
debugger is created
+ if (!filePath.includes('.vscode/extension')) {
+ if (!fs.existsSync(filePath)) {
+ let baseFolder = context.asAbsolutePath('./')
+ child_process.execSync(
+ `cd ${baseFolder} && sbt universal:packageBin`
Review comment:
For my own curiosity, is the `filePath` unique per run so will it always
rerun `sbt universal:packageBin` when in development mode? Or does that only
update when version numbers bump or something? If it's not unique, that means a
developer will need to manually run `sbt universal:packageBin` anytime there
are changes to the scala code, since this build system doesn't detect that? I
guess there isn't a way in the .vscode project files to tell vscode that it
needs to automatically run sbt when changes in a directory occur?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]