Comments (12)
What code had you opened when you were trying to use vls
?
from vls.
A fresh project with a lot of Win API interaction.
Do you need a code sample?
from vls.
module main
#flag windows -DWIN32_LEAN_AND_MEAN
#include <windows.h>
type HWND = voidptr
type DWORD = u32
type WPARAM = u64
type LPARAM = i64
type LONG = int
type UINT = u32
// https://docs.microsoft.com/en-us/windows/win32/api/windef/ns-windef-point
struct POINT {
mut:
x LONG
y LONG
}
// https://docs.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-msg
struct MSG {
mut:
hwnd HWND
message DWORD
wParam WPARAM
lParam LPARAM
time DWORD
pt POINT
lPrivate DWORD
}
// BOOL RegisterHotKey(HWND hWnd, int id, UINT fsModifiers, UINT vk);
fn C.RegisterHotKey(HWND, int, UINT, UINT) bool
// BOOL GetMessage(LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT wMsgFilterMax);
fn C.GetMessage(MSG, HWND, UINT, UINT) bool
// void * memset ( void * ptr, int value, size_t num );
fn C.memset(voidptr, int, size_t) voidptr
fn main() {
if !C.RegisterHotKey(C.NULL, 1, C.MOD_ALT, `b`) {
println("Register Hotkey is invalid")
return
}
msg := MSG{}
for !C.GetMessage(&msg, C.NULL, 0, 0) {
if msg.message != C.WM_HOTKEY {
continue
}
println("Hotkey clicked!")
}
}
from vls.
This and #89 are really hard to debug where to locate the offending function without the backtraces implemented other than TCC.
@alextwothousand can you try recompile VLS without -prod
? Thanks
from vls.
This and #89 are really hard to debug where to locate the offending function without the backtraces implemented other than TCC.
@alextwothousand can you try recompile VLS without
-prod
? Thanks
I wasn't explicitly compiling with -prod
.
Here is what I was doing to compile my program.
v -cc msvc main.v
from vls.
@alextwothousand I see. Can you recompile VLS using TCC (without specifying -prod
or -cc
flags) then? I meant that because compiling programs using the TCC compiler can produce backtraces and it's the only supported right now in V. I want to find out what made the VLS to trigger the get_type_symbol
panic.
from vls.
I will give this a go at the earliest convenience.
from vls.
@alextwothousand It might be a Windows issue but the above code works fine on Linux.
@danieldaeschle If you have the time, can you diagnose this issue?
from vls.
I can attempt to try it in Linux? What distribution are you running— just for reference?
The fact that it's a Windows only issue is... interesting.
from vls.
I can attempt to try it in Linux? What distribution are you running— just for reference?
The fact that it's a Windows only issue is... interesting.
It is interesting. My distro is Ubuntu 20.04 64-bit
from vls.
I can attempt to try it in Linux? What distribution are you running— just for reference?
The fact that it's a Windows only issue is... interesting.
It is interesting. My distro is Ubuntu 20.04 64-bit
OK. I will attempt to reproduce this either on Fedora or Arch.
from vls.
Closing this as it is not applicable anymore to the current version of VLS.
from vls.
Related Issues (20)
- Incorrect `map` type signature info for function return type. HOT 1
- Text synchronization error on Windows. HOT 2
- Support multiple instances of VLS HOT 2
- Grammar railroad diagram HOT 1
- LSP completion error: Content duplication HOT 1
- Constant errors when using VLS in Neovim HOT 4
- VLS requiring GLIBC 2.32 HOT 3
- `undefined ident` for prefixed module constants HOT 3
- README update for vls reports HOT 1
- vls not running on fresh install, doesn't work when using it as global command either
- Syntax highlighting error for V language in Helix Editor HOT 2
- VLS isn't responding HOT 7
- Cannot install VLS in VSCode HOT 1
- Can't install vls with vscode HOT 1
- VLS crash when you write something HOT 1
- VScode VLC performance issue HOT 1
- NO_RESULT_CALLBACK_FOUND error HOT 2
- Which documentation how to use with vscode. HOT 2
- Crashes immediately (in terminal, and in editor)
- now use vls or v-analyzer HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vls.