Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update main with v2.7.0 #328

Merged
merged 50 commits into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
f4760b3
Fix: restore NPM publishing URL
deribaucourt Jul 19, 2024
f487f7e
Chore: Update script
WilsonZiweiWang Jul 30, 2024
0529934
Chore: Update CI, scripts and README on wasm
WilsonZiweiWang Jul 30, 2024
bb8555e
chore(deps-dev): bump mocha and @types/mocha
dependabot[bot] Aug 1, 2024
501ea83
chore(deps-dev): bump @types/vscode from 1.90.0 to 1.92.0 in /server
dependabot[bot] Aug 1, 2024
3851406
chore(deps-dev): bump @types/vscode from 1.90.0 to 1.92.0 in /client
dependabot[bot] Aug 1, 2024
d081079
chore(deps): bump vscode-languageserver-textdocument in /server
dependabot[bot] Aug 1, 2024
3979475
chore(deps-dev): bump eslint-plugin-import from 2.28.1 to 2.29.1
dependabot[bot] Aug 1, 2024
1992f6b
Chore: Update tree-sitter-bitbake
idillon-sfl Aug 2, 2024
5efe6ee
Chore: Optimize script
WilsonZiweiWang Aug 1, 2024
e0e5c18
Fix: Adapt devtool status parsing for new Yocto releases
deribaucourt Aug 7, 2024
ccc7d32
UI: Add a sanity check for the working directory
deribaucourt Aug 12, 2024
9f67748
Test: provide a valid working directory for the eSDK driver Tests
deribaucourt Aug 12, 2024
14e271f
Fix: Fetch WASM and SPDX licenses in NPM package in CI
deribaucourt Aug 21, 2024
97fe258
Feat: Add a command to trigger global environment scan
WilsonZiweiWang Jul 16, 2024
06d9a47
Feat: Forward global env scan results to the server for processing
WilsonZiweiWang Jul 16, 2024
c8a33d8
Feat: Process global env scan results and store the outcome for later…
WilsonZiweiWang Jul 16, 2024
50cc975
Rename
WilsonZiweiWang Jul 16, 2024
1010f60
Feat: Use global env scan results as fallback when recipe scan is res…
WilsonZiweiWang Jul 16, 2024
bff028f
Chore: Trigger global env scan on saving .conf and .bbclass files
WilsonZiweiWang Jul 16, 2024
740abdf
Chore: Access the function name through 'name' property instead of ha…
WilsonZiweiWang Jul 18, 2024
fddb8ff
Chore: Show 'parsing' in status bar while running global env scan
WilsonZiweiWang Jul 18, 2024
ccb50a5
Chore: Show bitbake command option based on file extension
WilsonZiweiWang Aug 8, 2024
0e495c2
Chore: Only show recipe scan results on recipe files if available, ot…
WilsonZiweiWang Aug 8, 2024
1ebf4a6
Chore: Add parse-only option for global env scan task
WilsonZiweiWang Aug 20, 2024
79a87dd
Chore: Move global scan option to the top
WilsonZiweiWang Aug 22, 2024
5d149d5
Chore: Update CI
WilsonZiweiWang Aug 1, 2024
19a0cc1
Chore: Remove unused eslint plugins
WilsonZiweiWang Aug 27, 2024
1c545dc
Update: use eslint flat config
WilsonZiweiWang Aug 27, 2024
0f9262e
chore(deps-dev): bump eslint-plugin-n from 16.2.0 to 16.6.2
dependabot[bot] Sep 10, 2024
7744066
chore(deps-dev): bump eslint-plugin-promise from 6.1.1 to 6.6.0
dependabot[bot] Sep 10, 2024
9474a58
chore(deps): bump web-tree-sitter from 0.22.6 to 0.23.0 in /server
dependabot[bot] Sep 1, 2024
5218e18
Auto update references for commits, tags, etc
WilsonZiweiWang Sep 1, 2024
bfa190a
Auto update tree-sitter-bash parser info
WilsonZiweiWang Sep 10, 2024
ec75373
Fix: fix eslint configuration
deribaucourt Sep 12, 2024
7d61b45
Chore: Remove old server build location
deribaucourt Sep 16, 2024
800d7e4
Fix: Add a smaller timeout for container inode scan
deribaucourt Sep 13, 2024
748678f
Fix: Pass buildConfigurations environment to terminal profile
deribaucourt Sep 13, 2024
69db471
Fix: Use getBuildConfig instead of direct access to bitbakeSettings
deribaucourt Sep 13, 2024
2c31952
Fix: task_deps parsing on newer Yocto versions
deribaucourt Sep 16, 2024
3563a58
Data: Add recipe skipped field to BitbakeScanResult
deribaucourt Sep 13, 2024
e6984ff
Refactor: Move scanResultVersion definition to BitbakeScanResult.ts
deribaucourt Sep 13, 2024
d93a76d
Feat: Keep and track skipped recipes in the BitBakeProjectScanner
deribaucourt Sep 13, 2024
d302d71
Test: Ensure skipped recipes are detected and marked
deribaucourt Sep 13, 2024
38d515d
Feat: Do not report skipped recipe files in BitBakeProjectScanner
deribaucourt Sep 13, 2024
a9e235b
UI: Show skipped recipes reason in the recipes view
deribaucourt Sep 13, 2024
190d976
Optim: Prepare a recipe map for quick lookup
deribaucourt Sep 13, 2024
4c11212
Test: Skipped recipes are shown in the recipes view
deribaucourt Sep 13, 2024
a479db5
Release: update package version to 2.7.0
deribaucourt Sep 12, 2024
b7016e4
Release: add v2.7.0 changelog
deribaucourt Sep 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .eslintignore

This file was deleted.

43 changes: 0 additions & 43 deletions .eslintrc.js

This file was deleted.

5 changes: 5 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ jobs:
client/package-lock.json
- run: npm install
- run: npm run fetch:docs
- run: npm run fetch:wasm
- run: npm run fetch:spdx-licenses
- run: cd server && npm pack
- name: Archive server package
uses: actions/upload-artifact@v4
Expand All @@ -156,6 +158,9 @@ jobs:
steps:
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v4
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
- uses: actions/download-artifact@v4
- name: Publish to npm
run: npm publish $(find . -iname language-server-bitbake-*.tgz)
Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/update-ref.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Update references for commits, tags, etc

on:
workflow_dispatch:
workflow_dispatch:
schedule:
- cron: '0 0 1 * *' # Run on the first day of every month

Expand All @@ -20,29 +20,31 @@ jobs:
BASE_BRANCH: staging
FILE_PATHS: |
integration-tests/src/utils/version.ts
scripts/fetch-poky.sh
scripts/fetch-docs.sh
integration-tests/src/runTest.ts
scripts/fetch-spdx-licenses.sh
node-version: 20

steps:
- name: Checkout Repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ env.BASE_BRANCH }}

- name: Update required extension version
run: bash scripts/update-ref.sh

- name: Verify file changes
uses: tj-actions/verify-changed-files@v17
uses: tj-actions/verify-changed-files@v20
id: verify-changed-files
with:
files: ${{ env.FILE_PATHS }}

- name: Create pull request
if: steps.verify-changed-files.outputs.files_changed == 'true'
uses: peter-evans/create-pull-request@v5
uses: peter-evans/create-pull-request@v6
with:
add-paths: ${{ env.FILE_PATHS }}
title: Auto update references for commits, tags, etc
commit-message: Auto update references for commits, tags, etc
branch: update-ref
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# Inspired by bash-language-server under MIT license
# Reference: https://github.com/bash-lsp/bash-language-server/blob/8c42218c77a9451b308839f9a754abde901323d5/.github/workflows/upgrade-tree-sitter.yml

name: Update Tree Sitter WASM File
name: Update Tree Sitter Parser Info File

on:
workflow_dispatch:
schedule:
- cron: '0 12 * * 2'

jobs:
update-tree-sitter-wasm:
update-tree-sitter-parser-info-file:

runs-on: ubuntu-latest

Expand Down Expand Up @@ -45,15 +45,13 @@ jobs:
- name: Install Dependencies
run: npm install

- name: Update tree-sitter wasm
run: bash scripts/update-${{ matrix.tree-sitter-name }}-wasm.sh
- name: Update tree-sitter parser info file
run: bash scripts/update-${{ matrix.tree-sitter-name }}.sh

- name: Verify file changes
uses: tj-actions/verify-changed-files@v20
id: verify-changed-files
with:
# The script generates a new wasm file and replaces the existing one. Git will treat it as a different file even it is generated with the same commit and CLI
# Hence, we only compare the .info file. It should be enough to tell the difference
files: |
server/${{ matrix.tree-sitter-name }}.info

Expand All @@ -63,9 +61,8 @@ jobs:
with:
add-paths: |
server/${{ matrix.tree-sitter-name }}.info
server/${{ matrix.tree-sitter-name }}.wasm
title: Auto update ${{ matrix.tree-sitter-name }} wasm file
commit-message: Auto update ${{ matrix.tree-sitter-name }} wasm file and parser info
branch: update-${{ matrix.tree-sitter-name }}-wasm-file
title: Auto update ${{ matrix.tree-sitter-name }} parser info file
commit-message: Auto update ${{ matrix.tree-sitter-name }} parser info
branch: update-${{ matrix.tree-sitter-name }}-parser-info-file
base: ${{ env.BASE_BRANCH }}
token: ${{ secrets.GITHUB_TOKEN }}
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ debug.log
# node
node_modules/
# Compiled files
client/server/
client/out/
out/
*.js.map
Expand Down
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
# 2.7.0 - 2024.09.13

- Add bitbake environment scan for global variables
- Add skipped recipes to the tree view with skip reason
- Add support for latest Yocto devtool status output
- Add sanity check for the working directory
- Fix a bug where buildConfigurations specific settings were not applied
- Update task_deps parser for latest Yocto output
- Bump dependencies
- Fix NPM publishing
- Auto-update SPDX references

# 2.6.0 - 2024.06.19

- Support renaming of BitBake variables in Python and Shell functions
Expand Down
2 changes: 1 addition & 1 deletion README-DEVELOPER.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ See [the individual integration tests README](integration-tests/README.md).
## Tree-sitter
This extension uses [tree-sitter-bitbake](https://github.com/tree-sitter-grammars/tree-sitter-bitbake) and [tree-sitter-bash](https://github.com/tree-sitter/tree-sitter-bash) to parse the BitBake documents. They are installed with `npm run fetch:wasm`. The versions of tree-sitter-bitbake and tree-sitter-bash are documented in [server/tree-sitter-bitbake.info](server/tree-sitter-bitbake.info) and [server/tree-sitter-bash.info](server/tree-sitter-bash.info) respectively, along with the versions of the tree-sitter-cli that have to be used.

To update the .info files with the latest versions of tree-sitter-bitbake and tree-sitter-bash, it is recommended to use the scripts [scripts/update-tree-sitter-bitbake-wasm.sh](scripts/update-tree-sitter-bitbake-wasm.sh) and [scripts/update-tree-sitter-bash-wasm.sh](scripts/update-tree-sitter-bash-wasm.sh). The GitHub workflow [update-tree-sitter-wasm-file.yml](.github/workflows/update-tree-sitter-wasm-file.yml) is already responsible for doing it automatically.
To update the .info files with the latest versions of tree-sitter-bitbake and tree-sitter-bash, it is recommended to use the scripts [scripts/update-tree-sitter-bitbake.sh](scripts/update-tree-sitter-bitbake.sh) and [scripts/update-tree-sitter-bash.sh](scripts/update-tree-sitter-bash.sh). The GitHub workflow [update-tree-sitter-parser-info-file.yml](.github/workflows/update-tree-sitter-parser-info-file.yml) is already responsible for doing it automatically.

After updating the .info files, it is required to call `npm run fetch:wasm` in order to rebuild the Wasm files.

Expand Down
8 changes: 4 additions & 4 deletions client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
},
"devDependencies": {
"@types/find": "^0.2.2",
"@types/vscode": "^1.90.0"
"@types/vscode": "^1.92.0"
},
"workspaces": [
"src/lib"
Expand Down
4 changes: 2 additions & 2 deletions client/src/__tests__/unit-tests/driver/eSDKMode.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ describe('Devtool eSDK Mode Test Suite', () => {
const bitbakeDriver = new BitbakeDriver()
const bitbakeSettings: BitbakeSettings = {
pathToBitbakeFolder: __dirname,
workingDirectory: '/path/to/workspace',
workingDirectory: __dirname,
commandWrapper: '',
pathToEnvScript: 'fakeEnvScript',
pathToBuildFolder: 'nonexistent'
}
bitbakeDriver.loadSettings(bitbakeSettings, '/path/to/workspace')
bitbakeDriver.loadSettings(bitbakeSettings, __dirname)
const bitbakeTerminalSpy = jest.spyOn(BitbakeTerminal, 'runBitbakeTerminalCustomCommand').mockImplementation(async () => undefined as any)
const bitbakeExecutionSpy = jest.spyOn(ProcessUtils, 'finishProcessExecution')
clientNotificationManager.showBitbakeSettingsError = jest.fn()
Expand Down
13 changes: 13 additions & 0 deletions client/src/__tests__/unit-tests/driver/scanner.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,19 @@ describe('BitBakeProjectScanner', () => {
)
})

it('can detected skipped recipes', async () => {
const recipes = bitBakeProjectScanner.scanResult._recipes
// systemd is skipped in the poky distribution, because systemV is used instead
const systemdRecipe = recipes.find((recipe) => recipe.name === 'systemd')
expect(systemdRecipe).toEqual(
expect.objectContaining(
{
skipped: expect.stringContaining('skipped:')
}
)
)
})

it('can get recipes appends', async () => {
const recipes = bitBakeProjectScanner.scanResult._recipes
const busyboxRecipe = recipes.find((recipe) => recipe.name === 'busybox')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ describe('BitbakeDriver Recipes View', () => {
ext: '.bbappend',
name: 'base-files'
}
]
],
skipped: 'skipped: because reasons'
}
],
_includes: [],
Expand All @@ -66,6 +67,7 @@ describe('BitbakeDriver Recipes View', () => {
expect(rootTreeItem?.length).toStrictEqual(2)
const recipeItem = (rootTreeItem as BitbakeRecipeTreeItem[])[0]
expect(recipeItem.label).toStrictEqual('base-files')
expect(recipeItem.description).toEqual('skipped: because reasons')

const filesItems = await treeDataProvider.getChildren(recipeItem)
expect(filesItems).toBeDefined()
Expand All @@ -75,7 +77,7 @@ describe('BitbakeDriver Recipes View', () => {
mockVscodeEvents()

const bitbakeRecipesView = new BitbakeRecipesView(bitbakeWorkspace, bitBakeProjectScanner)
bitbakeRecipesView.registerView(contextMock)
bitBakeProjectScanner.onChange.emit(BitBakeProjectScanner.EventType.SCAN_COMPLETE, scanResult)
bitbakeRecipesView.registerView(contextMock)
})
})
Loading