-
Notifications
You must be signed in to change notification settings - Fork 55
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
Move infoview to JavaScript modules #151
Conversation
@Vtec234 - have the build steps changed? I get this error: |
@lovettchris Nope, they are still |
Nope, the |
AFAICT, you need to |
This is ready to review. I still can't get |
Possibly related to this: webpack-contrib/copy-webpack-plugin#674 This is |
There's also this new warning which we should suppress (preferably by turning
|
I'm also getting another (new?) warning: [{
"resource": "/home/gebner/vscode-lean4/lean4-infoview/src/infoview/main.tsx",
"owner": "eslint",
"code": {
"value": "@typescript-eslint/no-unsafe-argument",
"target": "..."
},
"severity": 8,
"message": "Unsafe argument of type `any` assigned to a parameter of type `string`.",
"source": "eslint",
"startLineNumber": 118,
"startColumn": 45,
"endLineNumber": 118,
"endColumn": 51
}] |
All should work now, |
I am not seeing this. |
Can't reproduce it either now. |
Did you test whether installing and running the extension from the packaged vsix still works? |
Yep! |
@Vtec234 - the CI failure you see here is due to a change I'm making to how windows elan-init.ps1 works (so there is no prompt when all goes well). See leanprover/elan#63. So we need to get my matching PR #157 in ASAP and then when you merge that fix your PR will be good. |
Wait, so did we break the interface of the installer file used on e.g. https://leanprover.github.io/lean4/doc/quickstart.html? Could we please not do that? |
@Kha The quickstart content is out of date. Leo needs to push the updates checked in with PR leanprover/lean4#842 |
Weird, I'll have to check why it didn't update automatically. But I'm still not okay with simply breaking the interface of previous versions of the script and on other platforms, especially if internally they are translated back to the original interface anyway. If all this was for |
I would agree if all platforms were using the same scripting language. But PowerShell is different, it has a different parameter parsing rules and I claim my change is more consistent with that. But I can remove the "-PromptOnError" since the linux script does not support that concept, and move it back to the vscode extension if this is what you prefer. But the syntax differences of powershell parameters "-DefaultToolchain" versus "--default-toolchain" should remain IMHO. |
Currently Leo has to run |
Since the CI failure is unrelated to the content of this PR, I think it would be okay to just merge it now assuming there are no further comments? EDIT: @lovettchris I think you accidentally put your response in my message by editing it :) Here is the response: Please don't I want to see your PR pass on Windows first. So please merge #157 first, it's ready now, thanks. |
Sorry about the edit, weird that github let me do that. The re-run passed: oh, and I see #157 is merged. Thanks. |
Cool, the windows tests pass now! |
Hmmm they passed on the CI build machine, but they still fail on my devbox with this error. Can you run the tests manually in vscode using the "Extension Tests - *" launch configurations?
and when I try and run a test in VS code it says something else:
this will be a huge productivity problem for me if we can't get it working smoothly. |
Yes, they run and pass locally for me. |
The parameters come from the |
Ok @Kha, I'll move this discussion to Zulip since it is unrelated to this PR |
On Linux? And that's with vscode and not with "npm run tests" ? |
Yup to both. I'll merge this now as much of the discussion has lost its relevance to the PR itself, if there are remaining dev setup issues let's fix them in followup PRs. |
We move the infoview to be a JavaScript module rather than a UMD library. This will allow us to dynamically import widget modules provided by the Lean server and provide them with the same version of React that we use, as well as core UI components such as interactive expressions.
@lean4/infoview
is now becoming something that is to be imported both by the webview in order to callrenderInfoview
, as well as by custom widgets in order to use interactive expressions, messages, etc. We may want to split these functionalities into two packages eventually, but for now I think this is okay as long as it's explained.CopyPlugin
invscode-lean4
doesn't seem to propagate changes to the infoview onnpm run watch
properly./CC @EdAyers