-
Notifications
You must be signed in to change notification settings - Fork 372
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
fix: improve the user experience about lg editor #3337
Conversation
Composer/packages/tools/language-servers/language-generation/src/lgParser.ts
Outdated
Show resolved
Hide resolved
Composer/packages/tools/language-servers/language-generation/package.json
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.
This looks good to me now.
@lei9444 please fix the UT |
=============================== Coverage summary ===============================
|
Composer/packages/tools/language-servers/language-generation/src/lgWorker.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.
A few minor issues, but other than that it looks good to me. 👍
Composer/packages/tools/language-servers/language-generation/src/lgParser.ts
Outdated
Show resolved
Hide resolved
Composer/packages/tools/language-servers/language-generation/package.json
Outdated
Show resolved
Hide resolved
Composer/packages/tools/language-servers/language-generation/__tests__/LGServer.test.ts
Outdated
Show resolved
Hide resolved
Composer/packages/tools/language-servers/language-generation/package.json
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.
Everything seems good now! Nice job
@@ -53,7 +53,7 @@ | |||
"runtime": "cd ../runtime/dotnet/azurewebapp && dotnet build && dotnet run", | |||
"test": "yarn typecheck && jest", | |||
"test:watch": "yarn typecheck && jest --watch", | |||
"test:coverage": "yarn test --coverage --no-cache --reporters=default", | |||
"test:coverage": "yarn test --coverage --no-cache --forceExit --reporters=default", |
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.
What does this do?
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 seems to solve the tests somehow not exits propertly in CI envivonment like i listed above
|
||
afterEach(() => { | ||
delete process.env.NODE_ENV; | ||
}); |
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.
Why isn't the node env already test when running tests? This doesn't seem right.
@@ -8,15 +8,15 @@ | |||
"build:demo": "cd demo && tsc --build tsconfig.json", | |||
"prepublishOnly": "npm run build", | |||
"clean": "rimraf lib demo/dist", | |||
"start": "cd demo && ts-node ./src/server.ts", | |||
"start": "cd demo && set NODE_ENV=development&& ts-node ./src/server.ts", |
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 isn't cross platform friendly.
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.
@a-b-r-o-w-n this got fixed already with cross-env
} catch (error) { | ||
// ignore if file not exist | ||
} | ||
} | ||
|
||
const id = fileId || uri; | ||
const { allTemplates, diagnostics } = Templates.parseText(content, id, importResolver); |
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.
Here we still need allTemplates
for intelligent suggestions (items in imported file)
* move lg api into worker * output worker files with readable names * update the version of botbuild-lg * remove promise in parse event * refacotr lg worker to catch all errors * add worker for lg lsp * add a null check when rejecting * dissallow node integration in worker threads * remove request_light * update worker file naming * fix unit test * set asar = false * add force exit for jest * move node_module to unpack folder * Swapped out server side worker with child process. * fix unit tests in lg lsp * clean the code * only support test env in lg lsp * fix some comments * update the dev dependency Co-authored-by: Andy Brown <asbrown002@gmail.com> Co-authored-by: Chris Whitten <christopher.whitten@microsoft.com> Co-authored-by: Tony Anziano <tonyanziano5@gmail.com>
Description
The lg parser takes a long time to parse a large file(20k lines will take 115s). And some lg template related functions are in UI thread. So the ui is blocked by the parser.
Now
But there is still an issue, the text in dialog will take a long time to show the update:
Task Item
refs #3295
refs #3314
Screenshots