Updated protocol version to 1.70.0.
Some checks failed
/ ci (clang, clang++) (push) Has been cancelled
/ ci (gcc, g++) (push) Has been cancelled

This commit is contained in:
2025-04-03 18:13:48 +02:00
parent 6464cd7bd0
commit dc0bbaaf54
9 changed files with 224 additions and 48 deletions

View File

@@ -34,8 +34,8 @@ import (
)
const (
protocolURL = "https://raw.githubusercontent.com/microsoft/vscode-debugadapter-node/master/debugProtocol.json"
packageURL = "https://raw.githubusercontent.com/microsoft/vscode-debugadapter-node/master/protocol/package.json"
protocolURL = "https://microsoft.github.io/debug-adapter-protocol/debugAdapterProtocol.json"
protocolVersion = "1.70.0"
versionTag = "${version}"
commonPrologue = `// Copyright 2019 Google LLC
@@ -782,24 +782,17 @@ type cppFiles map[cppTargetFile]*os.File
// protocol types from the schema, writes the types to the C++ files, then runs
// clang-format on each.
func run() error {
pkg := struct {
Version string `json:"version"`
}{}
if err := loadJSONFile(packageURL, &pkg); err != nil {
return fmt.Errorf("Failed to load JSON file from '%v': %w", packageURL, err)
}
protocol := root{}
if err := loadJSONFile(protocolURL, &protocol); err != nil {
return fmt.Errorf("Failed to load JSON file from '%v': %w", protocolURL, err)
}
hPath, cppPaths, cMakeListsPath, fuzzerhPath, fuzzerDictPath := outputPaths()
if err := emitFiles(&protocol, hPath, cppPaths, fuzzerhPath, fuzzerDictPath, pkg.Version); err != nil {
if err := emitFiles(&protocol, hPath, cppPaths, fuzzerhPath, fuzzerDictPath, protocolVersion); err != nil {
return fmt.Errorf("Failed to emit files: %w", err)
}
if err := updateCMakePackageVersion(cMakeListsPath, pkg.Version); err != nil {
if err := updateCMakePackageVersion(cMakeListsPath, protocolVersion); err != nil {
return fmt.Errorf("Failed to update CMakeLists.txt: %w", err)
}