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

Update to use newest Clink in pre-release branch #2084

Closed
2 of 3 tasks
WSLUser opened this issue Apr 22, 2019 · 23 comments
Closed
2 of 3 tasks

Update to use newest Clink in pre-release branch #2084

WSLUser opened this issue Apr 22, 2019 · 23 comments
Labels
👆 clink Upstream issue in clink. wontfix

Comments

@WSLUser
Copy link

WSLUser commented Apr 22, 2019

Purpose of the issue

  • Bug report (encountered problems/errors)
  • Feature request (request for new functionality)
  • Question

Version Information

Clink v1.0.0.a1
ConEmu 190331
Cmder 1.3.11.875 --prerelease

Windows 7

Description of the issue

I would like to use the newest binaries available and Cmder is behind. Understand having a stable branch but like VSCode and other projects, I prefer a beta branch that uses the latest releases.

https://github.com/mridgers/clink/releases

Currently clink fails to be called by Cmder/ConEmu. The error that appears is: inject: invalid option -- '-s' .

@daxgames
Copy link
Member

Cmder is a portable app. You can download the source and build the majority of it locally without any special tools. This would allow you to specify any versions you want.

If you want to put it in C:\program files, not recommended, you will need to give write access to the %cmder_root%\config folder to the user account using it which defeats the point of it being portable.

@daxgames
Copy link
Member

@WSLUser Simply:

  1. Download/Clone the source distro.
  2. Copy the scripts folder from the source distro into your expanded binary distro.
  3. Install 7zip.
  4. Edit %cmder_root%\vendor\sources to include the versions you want.
  5. From a windows Powershell session, outside Cmder, change to %cmder_root%\scripts
  6. Run .\build.ps1 -verbose

This will delete all in %cmder_root%\vendor replacing it with what you specified in %cmder_root%\vendor\sources.

@WSLUser
Copy link
Author

WSLUser commented Apr 22, 2019

Ok thanks. I was hoping for an automated solution that built out the latest binaries vice building myself. Also I did have it installed in Program Data so that probably caused the permission error.

@WSLUser WSLUser closed this as completed Apr 22, 2019
@daxgames
Copy link
Member

@WSLUser Building yourself takes all of 5 min. Its what I do before doing a new release to test all is good. Note: This is not going to build a new cmder.exe binary It just assembles the updated component sources into the vendor folder.

@CollinChaffin
Copy link

Hey @daxgames just a heads-up, there are still to this day issues trying to run any newer build of clink due to #206 mridgers/clink@3e012f3 where he just decided to remove a switch that cmder still uses in it's init files. So, if you drop-in any build of clink newer than 0.49, cmder will refuse to properly inject it and simply throw the "invalid argument -s" since that it how it currently still loads all the scripts into clink. Plus, clink is such that that is actually a terminating error, so the injection simply never even happens. It's a real PITA and would be nice to have cmder update to the latest clink since I have seen (amongst other issues) clink history continually be zeroed out and deleted with 0.49 at startup w/cmder. I believe it is the way older clink inits the history and running too many injections close together using the same history winds up just whacking it.

The newer clink seems to address that and numerous other issues I have seen so I would much rather not have to run it globally in path and simply update it within cmder.

@CollinChaffin
Copy link

Also @daxgames I see in latest commit you changed to (and I always enable this myself) to clink set history_io 1. Did you realize (I did NOT) that after 0.49 that option is also just up and gone?

with 1.0.x:

C:\>clink set history_io 1
ERROR: Setting 'history_io' not found.

Almost looks like a fork of clink may be required to keep it alive, anyway, and dropping/changing almost every option with zero docs seems a bit counterproductive to me. :(

@daxgames
Copy link
Member

daxgames commented Jun 4, 2019

@CollinChaffin thanks for the heads up.

@daxgames
Copy link
Member

daxgames commented Jun 4, 2019

It kinda funny I was thinking of trying the clink alphas but have not been able to get to it.

@daxgames
Copy link
Member

Opened issue #519 with Clink fir missing -s|--script [path] argument.

@daxgames
Copy link
Member

Opened issue #520 with Clink for missing history_io setting.

@daxgames daxgames reopened this Jun 11, 2019
@daxgames daxgames added the 👆 clink Upstream issue in clink. label Jun 11, 2019
@daxgames
Copy link
Member

The Clink 1.x.x alphas are not compatible with Cmder. I have opened issues with Clink to hopefully resolve this, see above.

@WSLUser
Copy link
Author

WSLUser commented Jun 11, 2019

I think the project is pretty much abandoned and would require someone such as yourself more familiar with the console internals to fork and make PR. There are other PRs pending that may prove useful adding as well if you decide to fork it.

@Stanzilla
Copy link
Member

I would not even bother with new Clink, it's just as dead as the .4.9 version

@CollinChaffin
Copy link

As it relates to this clink updating (and overall compatibility) issue I'm curious is anyone else having almost constant (yet randomized) issue with this happening to their clink .history file upon close of CMDer?

I just literally closed CMDer and finally watched it happen where the zeroing happens at close, despite having the clink history_io set to 1 for constant writing (which does actually work):

SNAG_6-14-2019_00-44-02

After a restore, this is what it looks like while running:

SNAG_6-14-2019_00-51-59

...and like I said even with multiple clink sessions open and all sharing the history_io as active flushing, that flushing/updating never zeros (AKA LOSES!) the history - at least until close I still put my $ on it being clink zeroing it and not CMDer.

I will continue testing to determine for sure whether it is as I suspect clink or only upon full CMDer/conemu close. Note this is actually with the normal 0.49 clink provided with CMDer - no updating which led me to wanting to update to begin with and hitting this issue.

@daxgames
Copy link
Member

@CollinChaffin I cant say I have seen it but it cant be Cmder since there is nothing actively running that is 'cmder'. Cmder launches conemu and exits then conemu starts cmd.exe that starts init.bat that starts clink. When init.bat is done it exits leaving clink running in cmd.exe in conemu.

It would have to be clink or MAYBE conemu. Are you closing conemu with multipe cmd tabs open or just one? If multiple what happens if you close one at a time?

@daxgames
Copy link
Member

@CollinChaffin I played a little with the Clink Alpha 1 today and I think there are equivalent settings to replace the history.io(history,shared) and the --scripts(clink.path).

I tried setting these in the new %cmder_root%\config\clink_settings file but that starts down a completely different path of incompatibilities. %cmder_root%\vendor\clink.lua tries to run but dies at line 11.

I have a feeling Clink will be stuck at 0.4.9 as far as Cmder is concerned.

@Stanzilla
Copy link
Member

Yup

@CollinChaffin
Copy link

CollinChaffin commented Jun 27, 2019

Hey @daxgames so sorry I missed this reply! Thanks for the follow-up I'm going to try to do a bit of additional testing as well with some of the PRs I've seen floating around various forks for clink to try to even put a finger on what a decent proposal might be for it moving forward but it is good to see at least some of the key (go figure!) features (even more recently added ones like history, LOL) despite suddenly being forgotten in latest build at least have partial hacky workarounds. :)

EDIT: Sorry also @daxgames as far as the history suddenly being zeroed, I was about 99% sure off the bat it probably wasn't specifically CMDer as the root cause, but posted here since admittedly I think the CMDer community probably has far in the most day-to-day usage of CLink and since I keep seeing it happen on multiple machines can't be the only one it's happening to. My guess is it's just a bug in the shutdown/file close/final write of Clink in conjunction with enabling that relatively newly added history_io I'll try to dig a bit more into that code too.

@WSLUser
Copy link
Author

WSLUser commented Jun 27, 2019

Couldn't we just add the relevant lines back? If it wasn't breaking anything and it wasn't according to the issue it referenced, then cmder shouldn't need any changes. I would just fork the latest code, revert that PR that only removed it because he rather remove the feature than properly explain it in a document. At that point, I'd then review the other PRs and see if any of them are worth merging (which I think at least few of them are). I don't have time for this myself but if @CollinChaffin would spend time doing that instead of figuring out a hacky workaround, I think that would be optimal.

@WSLUser WSLUser changed the title Update to use newest Clink, Clink_completions, ConEmu in pre-release branch Update to use newest Clink in pre-release branch Jun 27, 2019
@WSLUser
Copy link
Author

WSLUser commented Jun 27, 2019

I updated the OP and title as the issue here is getting the latest Clink working.

@Stanzilla
Copy link
Member

It's not worth it, he commited in the middle of some rewrite state, just keep using the old one.

@stale
Copy link

stale bot commented Jul 27, 2019

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in a week if no further activity occurs. Thank you for your contribution(s).

@stale stale bot added 👀 Awaiting Response Waiting to hear back from the issue reporter. and removed 👀 Awaiting Response Waiting to hear back from the issue reporter. labels Jul 27, 2019
@daxgames
Copy link
Member

Will not fix unless Clink becomes stable again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
👆 clink Upstream issue in clink. wontfix
Projects
None yet
Development

No branches or pull requests

4 participants