-
Notifications
You must be signed in to change notification settings - Fork 62
Feature/workspace/extension folder #2265
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
Feature/workspace/extension folder #2265
Conversation
clients/cobol-lsp-vscode-extension/src/services/util/FSUtils.ts
Outdated
Show resolved
Hide resolved
clients/cobol-lsp-vscode-extension/src/services/copybook/CopybookURI.ts
Outdated
Show resolved
Hide resolved
clients/cobol-lsp-vscode-extension/src/services/copybook/CopybookDownloadService.ts
Outdated
Show resolved
Hide resolved
clients/cobol-lsp-vscode-extension/src/services/LanguageClientService.ts
Outdated
Show resolved
Hide resolved
...ts/cobol-lsp-vscode-extension/src/__tests__/services/copybook/CopybookResolveURITest.spec.ts
Outdated
Show resolved
Hide resolved
...bol-lsp-vscode-extension/src/__tests__/services/copybook/CopybookDownloadServiceTest.spec.ts
Show resolved
Hide resolved
clients/cobol-lsp-vscode-extension/src/__tests__/services/SettingsTest.spec.ts
Outdated
Show resolved
Hide resolved
clients/cobol-lsp-vscode-extension/src/__tests__/services/LanguageClientServiceTest.spec.ts
Show resolved
Hide resolved
clients/cobol-lsp-vscode-extension/src/services/LanguageClientService.ts
Outdated
Show resolved
Hide resolved
@@ -55,6 +58,9 @@ function initialize() { | |||
outputChannel = vscode.window.createOutputChannel("COBOL Language Support"); | |||
languageClientService = new LanguageClientService(outputChannel); | |||
const configurationWatcher = new ConfigurationWatcher(); | |||
if (!fs.existsSync(Utils.getExtensionFolder())) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think that the creation of the filter on startup is a good idea. It should be created on demand.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The copybook folder command might get more complicated, if the folder does not always exist... But I am ok with either way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is changed to c64a4ff#diff-78d7e07f52d474dc72991f081f587e1f7aa1304d5b58996718648ae78c571cceL75
which is already created with activation.
clients/cobol-lsp-vscode-extension/src/services/LanguageClientService.ts
Outdated
Show resolved
Hide resolved
@@ -60,7 +63,7 @@ function searchCopybook( | |||
dialectType, | |||
); | |||
const allowedExtensions = resolveAllowedExtensions(folderKind, documentUri); | |||
result = searchCopybookInWorkspace( | |||
result = searchCopybookInExtensionFolder( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we backward compatible?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The copybooks that are stored under {workspace} /.cz4 is going to be redownloaded after resolving fails if provided settings are valid as before.
Do you see any other possible issues ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem is with copybooks that are part of the workspace not the downloaded ones.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you set it with cobol-lsp.cpy-manager.paths-local setting
. It will search for copybooks firstly from the provided path.
Do you mean not to ask to user to provide settings for copybooks local path ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does not work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is working. only if you provide the absolute path, which I think it is a good idea
For sake of backwards compatibility ;
This is resolved at : a5652c2
But the backwards logic wasn't a good idea. Why are we asking local path if we are already looking into workspace folder already ? User should be able to point a path if we ask to provide.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both relative (w.r.t. to workspace) and absolute path should work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be working with : a5652c2
Please also fix integration tests and squash commits |
clients/cobol-lsp-vscode-extension/src/services/util/FSUtils.ts
Outdated
Show resolved
Hide resolved
cb421c8
to
e938f32
Compare
clients/cobol-lsp-vscode-extension/src/__tests__/extensionTest.spec.ts
Outdated
Show resolved
Hide resolved
clients/cobol-lsp-vscode-extension/src/__tests__/services/SettingsTest.spec.ts
Outdated
Show resolved
Hide resolved
clients/cobol-lsp-vscode-extension/src/__tests__/services/SettingsTest.spec.ts
Outdated
Show resolved
Hide resolved
export function searchCopybookInWorkspace( | ||
export function searchCopybookInExtensionFolder( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that neither of these names is really appropriate...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any suggestions ? maybe searchCopybookInInternalFolder
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure, the function does too much stuff.
clients/cobol-lsp-vscode-extension/src/__tests__/commands/ClearCopybookCacheCommand.spec.ts
Outdated
Show resolved
Hide resolved
clients/cobol-lsp-vscode-extension/src/__tests__/services/SettingsTest.spec.ts
Outdated
Show resolved
Hide resolved
7901de4
to
8c441f8
Compare
clients/cobol-lsp-vscode-extension/src/commands/ClearCopybookCacheCommand.ts
Show resolved
Hide resolved
clients/cobol-lsp-vscode-extension/src/services/LanguageClientService.ts
Outdated
Show resolved
Hide resolved
clients/cobol-lsp-vscode-extension/src/services/copybook/CopybookDownloadService.ts
Outdated
Show resolved
Hide resolved
clients/cobol-lsp-vscode-extension/src/services/util/SubroutineUtils.ts
Outdated
Show resolved
Hide resolved
clients/cobol-lsp-vscode-extension/src/__tests__/services/SettingsTest.spec.ts
Outdated
Show resolved
Hide resolved
clients/cobol-lsp-vscode-extension/src/services/copybook/CopybookDownloadService.ts
Outdated
Show resolved
Hide resolved
clients/cobol-lsp-vscode-extension/src/services/copybook/CopybookDownloadService.ts
Outdated
Show resolved
Hide resolved
clients/cobol-lsp-vscode-extension/src/services/copybook/CopybookDownloadService.ts
Outdated
Show resolved
Hide resolved
I think that the relative paths in the user settings should not be used in combination with the new download directory - please add a test for this situation. |
clients/cobol-lsp-vscode-extension/src/services/copybook/CopybookMessageHandler.ts
Outdated
Show resolved
Hide resolved
...bol-lsp-vscode-extension/src/__tests__/services/copybook/CopybookDownloadServiceTest.spec.ts
Outdated
Show resolved
Hide resolved
...obol-lsp-vscode-extension/src/__tests__/services/copybook/CopybookMessageHandlerTest.spec.ts
Outdated
Show resolved
Hide resolved
...obol-lsp-vscode-extension/src/__tests__/services/copybook/CopybookMessageHandlerTest.spec.ts
Outdated
Show resolved
Hide resolved
clients/cobol-lsp-vscode-extension/src/services/copybook/CopybookDownloadService.ts
Outdated
Show resolved
Hide resolved
clients/cobol-lsp-vscode-extension/src/__tests__/services/SettingsTest.spec.ts
Outdated
Show resolved
Hide resolved
added test for this : 04536b2 |
clients/cobol-lsp-vscode-extension/src/__tests__/services/SettingsTest.spec.ts
Outdated
Show resolved
Hide resolved
...ts/cobol-lsp-vscode-extension/src/__tests__/services/copybook/CopybookResolveURITest.spec.ts
Outdated
Show resolved
Hide resolved
clients/cobol-lsp-vscode-extension/src/__tests__/services/SettingsTest.spec.ts
Outdated
Show resolved
Hide resolved
...ts/cobol-lsp-vscode-extension/src/__tests__/services/copybook/CopybookResolveURITest.spec.ts
Outdated
Show resolved
Hide resolved
clients/cobol-lsp-vscode-extension/src/__tests__/services/SettingsTest.spec.ts
Outdated
Show resolved
Hide resolved
clients/cobol-lsp-vscode-extension/src/__tests__/services/SettingsTest.spec.ts
Outdated
Show resolved
Hide resolved
...ts/cobol-lsp-vscode-extension/src/__tests__/services/copybook/CopybookResolveURITest.spec.ts
Outdated
Show resolved
Hide resolved
clients/cobol-lsp-vscode-extension/src/__tests__/services/SettingsTest.spec.ts
Outdated
Show resolved
Hide resolved
clients/cobol-lsp-vscode-extension/src/__tests__/services/SettingsTest.spec.ts
Outdated
Show resolved
Hide resolved
clients/cobol-lsp-vscode-extension/src/__tests__/services/SettingsTest.spec.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pending testing.
eda902c
to
1c8c9ee
Compare
4160e84
to
2e0d54d
Compare
Could you please resolve conflicts, clean up the PR description, and squash commits? |
57ee20a
to
4043fc0
Compare
clients/cobol-lsp-vscode-extension/src/services/copybook/CopybookDownloadService.ts
Show resolved
Hide resolved
a0c387c
to
4b848b6
Compare
…space/extension_folder
Changed copybook download folder from {workspace} /.c4z/.copybooks/... into {global storage folder}/.zowe/.copybooks/...
added 'open internal copybook folder command' to add copybook download folder to open workspaces
How Has This Been Tested?
Apply copybook settings as regular and try it out. nothing specific needed to test this.
Checklist: