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

Different behavior for "functionTest" and functionTest #218

Closed
mnemnion opened this issue Jul 8, 2024 · 5 comments
Closed

Different behavior for "functionTest" and functionTest #218

mnemnion opened this issue Jul 8, 2024 · 5 comments

Comments

@mnemnion
Copy link

mnemnion commented Jul 8, 2024

To illustrate what I mean:

Run test | Debug test
test "functionTest" {
    // tests go here....
}

test functionTest {
    // tests go here...
}

The action items for running and debugging tests don't show up for the kind of test which uses a name corresponding to the function being tested. It would be nice if it did!

If this is a config issue on my end, let me know and I'll close the issue. Thanks for your time and effort.

Zig 0.13.0, VSCode on macOS 1.90.2, Zig Language v0.5.8.

@Vexu
Copy link
Member

Vexu commented Jul 8, 2024

This feature does not exist yet, see #57 and #72. Are you using a fork perhaps?

@mnemnion
Copy link
Author

mnemnion commented Jul 9, 2024

Oh! how interesting.

I compiled my own ZLS after installing Zig 0.13.0, there was some lag in feature support and it was the easy way forward.

Other than that, I'm running Zig Language v0.5.8, standard download from VSCode.

But the combination of those two thing definitely provides run and debug, here's a screenshot:

Screen Shot 2024-07-09 at 10 20 46 AM

It's exceptionally useful, especially being able to set up a specific test and run the debugger directly on it.

It's possible that language server support for running and debugging tests means that the VSCode-specific plugin doesn't have to do anything extra here?

I'll leave this issue open long enough to check in with ZLS and figure out what's going on. It's starting to sound like this feature request should be filed with them.

@leecannon
Copy link
Contributor

@mnemnion ZLS does not provide any execution support.

Are you sure you don't have something like https://marketplace.visualstudio.com/items?itemName=ianic.zig-language-extras installed?

@mnemnion
Copy link
Author

mnemnion commented Jul 9, 2024

That's where it is, thanks.

@mnemnion mnemnion closed this as completed Jul 9, 2024
@mnemnion
Copy link
Author

mnemnion commented Jul 9, 2024

The issue is already tracked here, just in case someone runs across this same issue.

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

No branches or pull requests

3 participants