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

'ag' name conflicts with well know search utility 'Silver Searcher' #467

Closed
strobe opened this issue Dec 23, 2020 · 8 comments
Closed

'ag' name conflicts with well know search utility 'Silver Searcher' #467

strobe opened this issue Dec 23, 2020 · 8 comments
Labels
bug Something isn't working

Comments

@strobe
Copy link

strobe commented Dec 23, 2020

Describe the bug

 ~> npm install -g @asyncapi/generator
npm WARN deprecated fsevents@2.1.3: Please update to v 2.2.x
npm WARN deprecated mkdirp@0.3.5: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
/usr/local/bin/asyncapi-generator -> /usr/local/lib/node_modules/@asyncapi/generator/cli.js
npm ERR! code EEXIST
npm ERR! syscall symlink
npm ERR! path ../lib/node_modules/@asyncapi/generator/cli.js
npm ERR! dest /usr/local/bin/ag
npm ERR! errno -17
npm ERR! EEXIST: file already exists, symlink '../lib/node_modules/@asyncapi/generator/cli.js' -> '/usr/local/bin/ag'
npm ERR! File exists: /usr/local/bin/ag
npm ERR! Remove the existing file and try again, or run npm
npm ERR! with --force to overwrite files recklessly.

How to Reproduce

on macos do

brew install ag
npm install -g @asyncapi/generator

and as result you get

npm ERR! EEXIST: file already exists, symlink '../lib/node_modules/@asyncapi/generator/cli.js' -> '/usr/local/bin/ag```
@strobe strobe added the bug Something isn't working label Dec 23, 2020
@github-actions
Copy link
Contributor

Welcome to AsyncAPI. Thanks a lot for reporting your first issue.

Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.

@derberg
Copy link
Member

derberg commented Jan 4, 2021

@strobe I don't see any option other than use generator with npx instead, at least at the moment. We plan to work this year on generic CLI for asyncapi that does asyncapi validate or asyncapi generate or asyncapi add so this will be the time we will work on a different name of the cli.

do you see any other solution?

@strobe
Copy link
Author

strobe commented Jan 4, 2021

the main problem with this issue that a lot of tools (like emacs stuff) relayed on 'ag' command and will use a generator instead so a possible solution could be to come up with some more specific name/symlink like 'asgen', 'async-gen', 'asyng'.

do you see any other solution?
I believe at least for macOS is possible to add a flag to 'brew' installation to don't make a symlink

@derberg
Copy link
Member

derberg commented Jan 4, 2021

at the moment we already support 2 different names, so instead of ag you can use asyncapi-generator
https://github.com/asyncapi/generator/blob/master/package.json#L7-L8

I have to shamefully admit I have no idea how this information can help you 😅 but maybe some workaround would work with it for now?

@strobe
Copy link
Author

strobe commented Jan 6, 2021

workaround would work with it for now?

my workaround is very simple - I removed 'ag' and switched my configs to use different searcher app the 'ripgrep (rg)'
(but probably that doesn't acceptable for everyone)

More general workounds as you mention usage via 'npx' (but I not tested that it works with preinstalled 'ag' in system) or via 'docker'.

@derberg
Copy link
Member

derberg commented Jan 7, 2021

npx is separate, it is like installing ag on-demand only for the moment you need to run npx, not global install.

basic example -> https://github.com/asyncapi/generator#cli-usage-with-npx-instead-of-npm

@github-actions
Copy link
Contributor

github-actions bot commented Mar 9, 2021

This issue has been automatically marked as stale because it has not had recent activity 😴
It will be closed in 60 days if no further activity occurs. To unstale this issue, add a comment with detailed explanation.
Thank you for your contributions ❤️

@github-actions github-actions bot added the stale label Mar 9, 2021
@derberg
Copy link
Member

derberg commented Mar 9, 2021

I'm gonna close this one, we will not introduce any name changes to the current CLI as we already started working on a new one -> asyncapi/cli#1 and it will not be ag but asyncapi, which will solve this problem once we release and deprecate ag

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants