-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[Proposal] Replace current C#-based shim with C version #3634
Comments
I am not against making this change, after some code review of new shim, but it needs to be optional in first few weeks for proper testing. |
Can you provide instructions on how to do that? |
Hold off on this one found something that may affect people 71/scoop-better-shimexe#6 |
Based on the discussions on the bug, seems like it may be something on my PC. No one else had reported any issues. Maybe it is good to go. |
I was unable to reproduce @trajano issue, and I have interests in adopting this proposal since How can I help move this forward? FWIW, I forked ScoopInstaller/Shim at gerardog/Shim, replaced the C# version with this one, and updated the AppVeyor build scripts. last build P.S. Unsure if the build script should target x32, so it covers all platforms? |
I'm sorry I am not aware of how Scoop governance works. Only thing I can think of is to mention @lukesampson, and kindly request his advice. |
Any update on this? It would be greatly appreciated. |
Would be really nice if we could get this permanently fixed. I had to fix the Windows Terminal configuration by pointing to Would appreciate your insight, @rasa |
To @Ash258’s point of it needing to be optional to start, let’s initially implement via a scoop config shim v2
scoop reset * A user could then downgrade by: scoop config shim v1
scoop reset * Then, after a few weeks, we can decide if we want to migrate all users to the new shim, and anyone who wants to stay on the old shim can do so by pinning Sound good @Ash258, @r15ch13, @lukesampson, ...? I know that
and ask users to run that instead of |
I say just go for it, unless someone else reports issues. I am guessing the problems are localized to something on my machine 71/scoop-better-shimexe#6 |
There is another shim in C++. https://github.com/kiennq/scoop-better-shimexe |
So, how about
for the current c#-based shim,
for 71’s c-based shim,and
for kiennq’s c++ based shim? |
We could do it in an app, so
or
But that seems extremely kludgy, and I would vote against it. |
The reason for rewriting is because of this issue 71/scoop-better-shimexe#9, which I cannot figure out the root cause immediately. The C version has to manually release memory at sometimes maybe too early and cause use after release bug. That's why I've created a C++ version with proper memory management via smart pointers and ownership model.
Yes, if you found issue, please file a bugs. |
To test the changes in #3998, follow @gerardog’s comment below, and then to test: scoop config shim 71
scoop reset *
:: test
scoop config shim kiennq
scoop reset *
:: test To switch back to the old shim, type: scoop config shim default
scoop reset * To switch back to the released codebase, type: scoop config SCOOP_BRANCH master
scoop update |
Great work @rasa! What worked for me was:
|
Replying to @gerardog:
FYI, @71 said to @kiennq in regards @kiennq's c++-based shim: "Your C++ code is cleaner so I'd be inclined to use it instead of my C, but it does add a dependency to C++." |
To add to this:
|
So I did some more testing, I found that my antivirus (Bitdefender) was causing the significant increase in opening times. When disabling the antivirus I saw access times similar to what kiennq just posted. Interestingly adding an exception for the
To conclude, |
In any case, I don't think it makes that much sense to benchmark my shim against Kiennq's. C++ will probably be easier to maintain if more changes are needed and can always be optimized, so IMO we should go with their shim regardless. The only reason why my shim should be chosen over theirs is if we need fewer build dependencies, which AFAIK is not the case since we'll likely distribute the shim as a binary directly. |
I've been using the new shim since August and I haven't find any issues. IMHO it's time to push this fix. |
Windows Defender just quarantined the new shim as if it was a Virus...
|
You can try with this https://github.com/kiennq/scoop-better-shimexe/releases/tag/2.2.1, I've recompiled it with |
Not sure if this is the best place to post this but both 71 and kiennq have been stable for me. Solving the Ctrl+C issue is a really nice QOL improvement. The extra performance is just gravy. |
I see this PR is closed but the issues are still open. Dumb question. Has the new shim been released to the general audience? |
Hurray! Please consider closing those issues as well now, since they should all be solved. |
Ok, I closed all the above issues with this message: This issue should be fixed in #3998, which was merged into master. To use, type:
or
Eventually, one of those shims (probably kiennq) will be made the default. |
Oh, I missunderstood equinox then. ☹ 71 was a great step forward but kiennq has superseded it. Remember kiennq rewritten it in C++ to avoid some random crashes in 71's. Plus, me (and maybe other people in this thread) had been more inclined to test the later. I've been using it since May, Almost 7 months. IMHO, at this point kiennq should be the default already for every scoop user. |
Agreed. I have been using it for months without issue too.
I agree. I would be ok making it the default on new installs, and even if an existing user runs I will make this change to our develop branch soon. |
Another vote in favour of the kiennq shim. It has solved a number of problems for me and seems completely stable. Any ETA on making it the default? It would be nice not to have to always remember to change shims on every new system I work on. |
Per:
#3294: Killing the shim process does not kill the child process,
#2921: Wait for console applications only,
#2339: python in cmd Ctrl+C problem,
#2006: Windows cmd gvim.exe shim waits for subprocess,
#1896: Handle Control-C in shim wrapper,
#1606: Support shims to both console and GUI apps,
and extras/#2801: Putty shims open a blank window,
I would like us to consider replacing our current C#-based shim code, (or is it at ScoopInstaller/Shim ?) with this C-based code, at https://github.com/71/scoop-better-shimexe .
Its readme explains the benefits. I can't think of any drawbacks.
The text was updated successfully, but these errors were encountered: