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

Minor bug fixes #8

Closed
wants to merge 2 commits into from
Closed

Conversation

peitschie
Copy link

Thanks for this fork! It's nice to see some activity around this again.
I've just fixed two minor issues that blocked me from running this extension with my local setup (karma+jasmine+webpack).

I'm happy to rework them in any way you see fit 😃

…as a space)

This wraps the karma base config in quotes if it's found to contain spaces.
E.g.,

[2021-10-28 12:18:55.410] [DEBUG] [KarmaCommandLineTestServerExecutor:CommandLineProcessHandler]: Process 9y9frhllqbh:
Executing command: 'npx'
with args: ["karma","start","\"C:/Users/Jane Doe/.vscode/extensions/lucono.karma-test-explorer-0.2.1/dist/karma.conf\"","--no-single-run"]
…ge reload!"

Experienced with karma 5.1.1 and jasmine 3.5.0
@lucono
Copy link
Owner

lucono commented Oct 29, 2021

Thanks for the PR, @peitschie. You mind opening bug issues for these two and providing the debug logs and as much other information as possible in the bug template - such as your operating system where this bug occurs. Command argument quoting and/or escaping has different rules on different operating systems and can easily work on one and break on another, being very error-prone. With the logs, it'll be easier to test and validate the fix for other platforms as well. Thanks.

@peitschie
Copy link
Author

No worries at all. Can appreciate how complex multi-platform escaping is. I've tried to target the patch in a way that it will never make things worse, but I haven't really tried hard on OSX/Linux, as I know there are a lot more characters that can make their ways into paths on those systems.

@peitschie
Copy link
Author

I've raised #9 for the spaces-in-paths issue, and #10 for the clearContext change.

For the client context tweak however, I'm unable to find a reproduction case I can share publicly, unfortunately. I've been through my tests with a fine-tooth comb and found no issues. I've even tried stripping down the whole suite to practically nothing, and still this error turns up.

As best as I can guess, it might be connected with karma-runner/karma#3482. Updating to karma 6 solves the issue, but for various reasons this isn't something I can do for the repo at this stage.

I had a search through your own changes here, and could discover any reason why the clearContext is being forced as a mandatory setting. Turning it off fixes the issue... but I don't really know the wider impacts of this tweak.

@lucono lucono changed the base branch from master to beta October 30, 2021 18:49
@lucono
Copy link
Owner

lucono commented Oct 30, 2021

@peitschie Thanks for filing the issues. The fix for issue #10 looks good, and I'll merge it if you can split out the proposed fixes for #9 into a different PR. I will look into the Mac/Linux part to make sure that the file path space issue can be resolved for all of the platforms after which I'll publish both fixes to the marketplace. Thanks.

@peitschie
Copy link
Author

Apologies for the delay here @lucono ... it's been a long weekend for most in my country 😃
Do you still want me to do the above splitting of the PRs?

@lucono
Copy link
Owner

lucono commented Nov 4, 2021

No worries @peitschie. I've included your proposed change for client.clearContext in PR #11, so we should be good. For the filename space issue, I've implemented a different approach that bypasses the shell and delegates directly to the OS to handle any quoting and escaping, which should work across Windows and Mac/Linux while avoiding error-prone manual quoting/escaping. If you don't mind testing with the beta branch to verify if it resolves the space issue for you on Windows, I will publish it to the marketplace.

You can build it locally with npm run validate, and then manually install the .vsix file that's generated in the project root. It should show up as v0.3.0. Thanks.

@peitschie
Copy link
Author

Superseded by #11 🎉

@peitschie peitschie closed this Nov 4, 2021
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