-
Notifications
You must be signed in to change notification settings - Fork 21
Apache Daffodil™ Extension for Visual Studio Code: Development
For development, there are some additional prerequisites that are required for building the Apache Daffodil™ Extension for Visual Studio Code:
- To automatically recompile code when it changes, run:
yarn watch
As watch
runs, fix any problems that arise in the Problems tab
.
- Run the Apache Daffodil™ Extension for Visual Studio Code in debug mode.
- Clone the project https://github.com/apache/daffodil-vscode.git
- Open the project folder in VS Code.
- Run
yarn
to update the local dependencies. - Press
F5
(or launch "Extension" under the "Run and Debug" pane) to build and launch the extension in another VS Code window. - In that newly loaded window, named "sampleWorkspace", you can then debug schema files using the local version of the extension.
The local Apache Daffodil™ Extension for Visual Studio Code downloads and caches the Apache Daffodil™ Debugger corresponding to the latest extension release. If you want to test a local version of the Apache Daffodil Debugger, you need to:
- add
"useExistingServer": true
to the configuration in yourlaunch.json
in the sample workspace; - launch the backend debugger locally, using a launch configuration like below:
This will start the debug adapter and await a connection from the Apache Daffodil VS Code Extension (usually on TCP port 4711); and
{ "type": "scala", "name": "DAPodil", "request": "launch", "mainClass": "org.apache.daffodil.debugger.dap.DAPodil", "args": [] }
- debug your schema file, as long as it has the
useExistingServer
setting above.
The Apache Daffodil VS Code Extension comes with an automated test suite. Run it as follows:
yarn test
By default, the test suite will use the earliest supported release of VS Code. To test against any specific version of VS Code (in this example, VS Code version 1.74.3), execute the test suite as follows, setting DAFFODIL_TEST_VSCODE_VERSION
to the desired version:
DAFFODIL_TEST_VSCODE_VERSION=1.74.3 yarn test
Set DAFFODIL_TEST_VSCODE_VERSION
to stable
to use the latest stable release, or to insiders
to use the latest (nightly) insiders build.
HTTPS TLS certificates are verified by default. When running the test suite in certain environments (e.g., company VPN that uses endpoint protection), TLS certificate verifications may fail with a self-signed certificate error. If this is the case, either have node trust the endpoint protection certificate, or use one of these workarounds to disable the certificate verification:
NODE_TLS_REJECT_UNAUTHORIZED=0 yarn test
or
node ./out/tests/runTest.js --disable_cert_verification
WARNING: Do not export NODE_TLS_REJECT_UNAUTHORIZED=0
into your environment as it will disable TLS certificate verification on all node HTTPS connections done in that shell session.
To build docx
(Word formatted) documentation, from the top of the cloned repository, run:
cd docs && make all
For GitHub CI action updates (pull requests that start with Bump actions/...), make sure the affected workflows still operate as expected (they are automatically CI tested). GitHub CI actions update workflow YAML files, and are part of the CI infrastructure and not a code dependency. These should be relatively quick and easy to assess compared to code dependencies.
If the updates are not GitHub CI action updates, then additional scrutiny is required. When reviewing and verifying dependency bot updates that are part the software supply chain being distributed, please use the following checklist:
- Do all automated continuous integration checks pass?
- Is the update a patch, minor, or major update?
- Is the license still compatible with ASF License Policy?
- Have any changes been made to LICENSE/NOTICE files that need to be incorporated?
- Have any transitive dependencies been added or changed?
Milestone-level project status can be monitored using the Projects tab in the Project's GitHub repository.
Copyright © 2023 The Apache Software Foundation. Licensed under the Apache License, Version 2.0.
Apache, Apache Daffodil, Daffodil, and the Apache Daffodil logo are trademarks of The Apache Software Foundation.