Skip to content

Latest commit

 

History

History
103 lines (74 loc) · 4.26 KB

File metadata and controls

103 lines (74 loc) · 4.26 KB
date 2025-01-08

Update Hint Data to The Latest Version

Prerequisites

All hint data including can be found in the directory src/hint-data/manifests. And all of them are generated by the scripts in src/hint-data/fetch. This also means that in most cases, you should not manually edit them.

There are many hint data generator scripts need to request web page and download them from the internet. You can find the URLs of these web pages in the file src/hint-data/manpage-url.ts.

To reduce the number of network requests, there is a cache mechanism for the fetch scripts. In short, you can use the one of the following approaches to ensure the scripts request the latest version of document from the internet rather than read from old local cache files:

# Approach 1:
export NO_CACHE=1

# Approach 2:
rm -r cache

SOP

# Please build this project once to generate fetch-related scripts
# And you need to re-run the following command after you changed the source code in `src` directory.
yarn build:ts

Update Systemd Support

Firstly, update the systemd-related URL in src/hint-data/manpage-url.ts Then, run the following command to fetch the docs data and detect the changes

# There is a mechanism in the systemd docs fetch scripts for detecting changes in docs of systemd.
# To ensure it works properly, please make sure there are no any dirty changes in the `manifests` directory 
# before updating the hint data each time.
git checkout -- src/hint-data/manifests; 
git clean -f -- src/hint-data/manifests;

yarn run fetch:base
# or ./ts src/hint-data/fetch/systemd-all.ts

Then review the new log file in logs directory to check the following things:

  1. Does the fetch script work properly? Because the docs maybe updated in the structure. You may need to update the fetch scripts for the latest docs just like the changes on fetch scripts in this commit: https://github.com/hangxingliu/vscode-systemd/commit/59e8aa90ff027e18a4213c6c9669e47895e9433f
  2. Any new unit file types?
  3. Any new sections?
  4. Are there any directives that have been removed?
  5. Read the changelog from systemd and the check the log file to add more auto-completion support for values if any new just like this commit: https://github.com/hangxingliu/vscode-systemd/commit/dcdfc25ca0b2497b5c347f21138c6f47721cd1c1

Update Podman Quadlet Support

git checkout -- src/hint-data/manifests; 
git clean -f -- src/hint-data/manifests;

# Fetching and generating hint data about Podman Quadlet
yarn run fetch:podman
  1. Are any new sections or file extensions added?
  1. Are any new directives that accepts boolean value added? Then please update _PODMAN_BOOLEAN_DIRECTIVES config and generate the manifest again

Update Mkosi Support

git checkout -- src/hint-data/manifests; 
git clean -f -- src/hint-data/manifests;

# Fetching and generating hint data about Podman Quadlet
yarn run fetch:mkosi

Update Other Hint Data

# Fetching and generating hint data about Linux Capabilities
yarn run fetch:capabilities

# Fetching and generating hint data about Linux syscalls
yarn run fetch:syscalls