-
-
Notifications
You must be signed in to change notification settings - Fork 111
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
feat(developer): VSCode plugin for building 🗼 #12757
base: epic/ldml-editor
Are you sure you want to change the base?
Conversation
User Test ResultsTest specification and instructions User tests are not required Test Artifacts
|
Should this be based on |
Oops, yes, thanks! |
b93b28f
to
b65ba85
Compare
5c3984f
to
85dbd3a
Compare
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 feel like this PR is a good draft. But it needs a lot of work before it is ready to merge into the epic branch. Code that lands in an epic needs to be production ready -- with neat attachment points for follow-on PRs. We don't want commented-out code, test code, or code that will need re-review in general to land in the epic branch.
I've given some initial feedback. Hope this is not too depressing! I am excited for where this is going.
Finally, we should back-burner this work and focus on the LDML keyboard editor work as a priority. I think it might be sensible to refactor the .kpj handling in kmc into a kmc-project module and build on that. I can certainly take the changes in this PR into account if I take that on (or you can).
This package is a standalone [VSCode](https://code.visualstudio.com) plugin which offers: | ||
|
||
- a Build Task for building .kpj files into a package | ||
- when building the .kpj file, all .kmn and .xml (LDML keyboard) files will be compiled as well |
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.
needs to also build .kps and .model.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.
- build .kps (actually I think it does, it just uses the .kpj to locate them?)
- build .model.ts
}; | ||
const compiler = new kmcLdml.LdmlKeyboardCompiler(); | ||
if (!await compiler.init(callbacks, ldmlCompilerOptions)) { | ||
msg(`Compiler failed init\r\n`); |
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 we should avoid embedding NL in the messages -- this should be in the message function. Also, we are trying to keep all messages in separate files for future localization
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.
- update msg to have nl by default.
* @param msg callback for writing messages | ||
* @returns accept on OK, otherwise throws | ||
*/ | ||
export async function buildProject(workspaceRoot: string, |
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 function is very long and should be broken into smaller chunks
if (didCompilePkg) { | ||
throw Error(`Error: two packages were encountered.`); | ||
} |
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 do you error on multiple packages?
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 this was a mistake.
if (!didCompileSrc) { | ||
throw Error(`Error: no source files were compiled.`); | ||
} |
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 legitimate to have a project with only a .kps and no .kmn or .xml
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.
- remove error
package-lock.json
Outdated
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.
7500 additional lines in package-lock.json is a little concerning in terms of dependency creep; I know that's almost all in devDependencies but we need to be monitoring
I got the rename in and will move this back to draft for now. 100% on quality. |
erm. The one thing about tabling this is, it's also the substrate for the visual editor. But, I think I can make a draft PR off this draft PR. And can work on the rest separately. |
a1e73a5
to
cb65131
Compare
cb65131
to
f890a57
Compare
- basic build of .kpj, .kps, .kmn, .xml Fixes: #12756 Co-authored-by: Marc Durdin <[email protected]>
f890a57
to
1aee4ed
Compare
OK. I'm going to let this one sit for a bit. It'll have some conflicts to work through. |
Fixes: #12756
@keymanapp-test-bot skip