Allow users to customize the root path to be used by the Smithy VSCode extension. Otherwise, whenever we have the smithy-build.json file not in the workspace root, it fails with the following (as per commit 6e8f997):
Dump from .smithy.lsp.log
[18:14:14] Created a temporary folder for file contents /var/folders/dc/07t_8b2n41lgnz09y651104w0000gn/T/smithy-lsp7987430497366641088
[18:14:14] Recreating project from /smithy-vscode/test-fixtures/suite1
[18:14:14] Imports from config: [/smithy-vscode/test-fixtures/suite1] will be resolved against root /smithy-vscode/test-fixtures/suite1
[18:14:14] Discovered smithy files: [/smithy-vscode/test-fixtures/suite1/smithy/main.smithy]
[18:14:14] Downloading external dependencies for SmithyBuildExtensions(repositories = [], artifacts = [], imports = [])
[18:14:14] Downloaded external jars: []
[18:14:14] [ERROR] example.weather#GetCurrentTime: Unable to resolve trait `aws.api#dataPlane`. If this is a custom trait, then it must be defined before it can be used in a model. | Model /smithy-vscode/test-fixtures/suite1/smithy/main.smithy:18:1
[18:14:14] [ERROR] example.weather#Weather: Unable to resolve trait `aws.api#service`. If this is a custom trait, then it must be defined before it can be used in a model. | Model /smithy-vscode/test-fixtures/suite1/smithy/main.smithy:9:1
[18:14:14] Recreating project from /smithy-vscode/test-fixtures/suite1
[18:14:14] Imports from config: [/smithy-vscode/test-fixtures/suite1] will be resolved against root /smithy-vscode/test-fixtures/suite1
[18:14:14] Discovered smithy files: [/smithy-vscode/test-fixtures/suite1/smithy/main.smithy]
[18:14:14] Downloading external dependencies for SmithyBuildExtensions(repositories = [], artifacts = [], imports = [])
[18:14:14] Downloaded external jars: []
[18:14:14] [ERROR] example.weather#GetCurrentTime: Unable to resolve trait `aws.api#dataPlane`. If this is a custom trait, then it must be defined before it can be used in a model. | Model /smithy-vscode/test-fixtures/suite1/smithy/main.smithy:18:1
[18:14:14] [ERROR] example.weather#Weather: Unable to resolve trait `aws.api#service`. If this is a custom trait, then it must be defined before it can be used in a model. | Model /smithy-vscode/test-fixtures/suite1/smithy/main.smithy:9:1
[18:14:14] [ERROR] example.weather#GetCurrentTime: Unable to resolve trait `aws.api#dataPlane`. If this is a custom trait, then it must be defined before it can be used in a model. | Model /smithy-vscode/test-fixtures/suite1/smithy/main.smithy:18:1
[18:14:14] [ERROR] example.weather#Weather: Unable to resolve trait `aws.api#service`. If this is a custom trait, then it must be defined before it can be used in a model. | Model /smithy-vscode/test-fixtures/suite1/smithy/main.smithy:9:1
[18:14:14] Recompiling /smithy-vscode/test-fixtures/suite1/smithy/main.smithy (with temporary content Optional.empty) raised 2 diagnostics
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Issue #, if available: N/A
Description of changes:
Allow users to customize the root path to be used by the Smithy VSCode extension. Otherwise, whenever we have the
smithy-build.json
file not in the workspace root, it fails with the following (as per commit 6e8f997):Dump from .smithy.lsp.log
[18:14:14] Created a temporary folder for file contents /var/folders/dc/07t_8b2n41lgnz09y651104w0000gn/T/smithy-lsp7987430497366641088 [18:14:14] Recreating project from /smithy-vscode/test-fixtures/suite1 [18:14:14] Imports from config: [/smithy-vscode/test-fixtures/suite1] will be resolved against root /smithy-vscode/test-fixtures/suite1 [18:14:14] Discovered smithy files: [/smithy-vscode/test-fixtures/suite1/smithy/main.smithy] [18:14:14] Downloading external dependencies for SmithyBuildExtensions(repositories = [], artifacts = [], imports = []) [18:14:14] Downloaded external jars: [] [18:14:14] [ERROR] example.weather#GetCurrentTime: Unable to resolve trait `aws.api#dataPlane`. If this is a custom trait, then it must be defined before it can be used in a model. | Model /smithy-vscode/test-fixtures/suite1/smithy/main.smithy:18:1 [18:14:14] [ERROR] example.weather#Weather: Unable to resolve trait `aws.api#service`. If this is a custom trait, then it must be defined before it can be used in a model. | Model /smithy-vscode/test-fixtures/suite1/smithy/main.smithy:9:1 [18:14:14] Recreating project from /smithy-vscode/test-fixtures/suite1 [18:14:14] Imports from config: [/smithy-vscode/test-fixtures/suite1] will be resolved against root /smithy-vscode/test-fixtures/suite1 [18:14:14] Discovered smithy files: [/smithy-vscode/test-fixtures/suite1/smithy/main.smithy] [18:14:14] Downloading external dependencies for SmithyBuildExtensions(repositories = [], artifacts = [], imports = []) [18:14:14] Downloaded external jars: [] [18:14:14] [ERROR] example.weather#GetCurrentTime: Unable to resolve trait `aws.api#dataPlane`. If this is a custom trait, then it must be defined before it can be used in a model. | Model /smithy-vscode/test-fixtures/suite1/smithy/main.smithy:18:1 [18:14:14] [ERROR] example.weather#Weather: Unable to resolve trait `aws.api#service`. If this is a custom trait, then it must be defined before it can be used in a model. | Model /smithy-vscode/test-fixtures/suite1/smithy/main.smithy:9:1 [18:14:14] [ERROR] example.weather#GetCurrentTime: Unable to resolve trait `aws.api#dataPlane`. If this is a custom trait, then it must be defined before it can be used in a model. | Model /smithy-vscode/test-fixtures/suite1/smithy/main.smithy:18:1 [18:14:14] [ERROR] example.weather#Weather: Unable to resolve trait `aws.api#service`. If this is a custom trait, then it must be defined before it can be used in a model. | Model /smithy-vscode/test-fixtures/suite1/smithy/main.smithy:9:1 [18:14:14] Recompiling /smithy-vscode/test-fixtures/suite1/smithy/main.smithy (with temporary content Optional.empty) raised 2 diagnosticsBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.