Skip to content
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

Autocompletion for viewModel/baseType directives #6

Open
wants to merge 25 commits into
base: main
Choose a base branch
from

Conversation

exyi
Copy link
Member

@exyi exyi commented Sep 26, 2022

The type list comes from ILSpy's typesystem, compiled using .NET native as a shared library (their static linking is broken)

image

This is mostly a PoC of the ILSpy running in .NET native. It is then loaded to the language server as node addon. It currently only compiles on Linux, it should be similar on MacOŠ, and we can skip Windows for now. The extension should work fine without it.

TODO:

  • adjust CI and publish
  • add Mac support to the build script
  • make sure it's failsafe

Copy link
Member

@acizmarik acizmarik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

src/native-lib-dotvvm-spy/test.c Outdated Show resolved Hide resolved
src/native-lib-dotvvm-spy/AnalyzerContext.cs Outdated Show resolved Hide resolved
src/native-lib-dotvvm-spy/DotvvmUtils.cs Show resolved Hide resolved
src/native-lib-dotvvm-spy/node_binding/dotvvm-analyzer.cc Outdated Show resolved Hide resolved
src/native-lib-dotvvm-spy/node_binding/dotvvm-analyzer.cc Outdated Show resolved Hide resolved
try {
dotvvmspy = require('lib-dotvvm-spy');

if (dotvvmspy?.sanityCheck() !== true) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should not we also check that we are running in a 64-bit process? I may have missed it if it is checked elsewhere

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would fail to load and crash, but I added the checks for platform and architecture

@exyi exyi force-pushed the dotnet-native-analyzer branch from 17e5467 to 1e86c74 Compare November 22, 2022 12:15
@exyi exyi force-pushed the dotnet-native-analyzer branch 2 times, most recently from 681807c to 24629e8 Compare December 8, 2022 11:37
@exyi exyi force-pushed the dotnet-native-analyzer branch from 24629e8 to 7498222 Compare December 8, 2022 11:53
exyi added 4 commits December 8, 2022 16:12
pkg supports loading additional libraries if the loaded X.node file
is on node_modules folder. Our library wasn't, because the node_modules
entry was symlinked into another directory. So only the something.node
file was loaded, not the libDotvvmSpy.so file
See the parent commit for description
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants