-
-
Notifications
You must be signed in to change notification settings - Fork 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
JHipster should not install tabtab completions automatically #6162
Comments
Although there is an error message, the generator-jhipster should be installed. Anyway, jhipster-oh-my-zsh is the best 😛 |
Installation works fine but upgrade fails. |
-> we could have a specific sub-generator that installs autocompletion The only downside is that it goes against our "great developer experience" goal. |
First great user experience is that it works ;) |
could not find the issue with this user about .profile but I found this related issue: #6089 |
@gmarziou @jdubois @pascalgrimaud TabTab doesnt support windows as far as I know so we have few options to consider. (Not in any order)
So please comment on what is more preferable |
@deepu105, Personally I'm not a big fan of tabtab and it's approach to magically configure things (modifying personal conf files...). Although it always worked for me with nothing to do so it is still kinda cool... So people need to add the following line to their bashrc/zshrc: |
@deepu105 I'm not sure option 2 would work with upgrade, option 4 could work but it does not solve the other issues I mentioned. I'm in favor of letting the user decide what to do with her/his files, like baking them up before running sub module, so I like @PierreBesson idea. In the same idea, I think the upgrade generator should warn the user that it's going to make some changes in her/his local git repo and that it would be a good idea to push local branches to server before starting the upgrade. |
@PierreBesson I like your idea but then the problem is it needs manual steps to make it work and hence mostly will be used only by us and other experienced people. I would atleast like to prompt the user to install completion during installation otherwise I'm afraid that no body will actually do it and use it. It will be like our fish/zsh plugins I guess its used only by our core team mostly (of course just a guess based on queries we get for them) |
Maybe a slight variation of @PierreBesson's idea: we could a have a new sub generator dedicated to all potential helpers (same as what ci-cd does in supporting several tools) and ask a question in the main generator: do you want to improve your development environment? I have thought of naming it: "environment", "boost" or "productivity". |
Maybe we can just print instructions to setup completion after the generator install. If it is just a matter of adding one line to .bashrc/.zshrc I'm sure many people will do it. I'm currently hacking on some auto complete scripts... Currently my main issue with our current auto complete is that it's not great, for example it can't auto complete file names when running |
Npm scrpits of generator-jhipster are useful for global installation but they are not required in teh context of an upgrade where the focus is on code and depenencies. These scripts can make the upgrade fail for bad reasons llike issue jhipster#6162 about tabtab. This change add `--ignore-scripts`option to yarn or npm install during upgrade.
We could also look at how npm does the autocompletion. As they add anything to the . files |
Ahh, ok tabtab does the same actually, we just need to use it properly |
Dis some digging so the below enables completion on current shell session for jhipster, but for this to work you need tabtab installed globally with |
After upgrading from Our workaround:
|
Do you really mean 4.6.2 or current master? |
The problem appeared after upgrading to 4.6.2 |
As a workaround you could try to add |
Thank you, works for us. pom.xml diff
|
I think we clan close this issue as tabtab has been removed in 4.7.0 and we can open an improvement issue to track how to provide completion in a less intrusive way. |
Overview of the issue
JHipster should not install tabtab completions automatically, it should ask permission to the user.
Motivation for or Use Case
It's been a long time since I did run jhipster on Windows, in fact it was before jhipster cli was introduced and today I tried and I could not get it working.
One reason why Windows is a hard platform is because our users have many shells: cmd.exe, powershell and git bash are the most common ones. Cygwin can also be found.
So each time we mess with shell on Windows, we can be sure it won't work for some users.
Currently, my problem is with tabtab (which does not work on Windows or may work with bash): it is installed by generator-jhipster using install script in package.json but no uninstall script.
Tabtab writes to a different global location based on type of shell it has detected, surprisingly this includes locations that require sudo rights according to their doc (I did not check) :
/usr/local/share/zsh/site-functions
,/usr/share/bash-completion/completions
or/etc/bash_completion.d
.I think JHipster should not require sudo rights to install.
This forced installation creates another potential issue: it's not versioned, tabtab writes stuff in a global location so if you have projects using different versions of jhipster, all of them will get completions from latest installation.
"jhipster upgrade" installs locally 2 versions of jhipster but we can't tell it not to run tabtab, so a local installation results in global impact which is bad per se and in my particular case results in a failure.
upgrade failing due to tabtab
It's not ideal also for continuous integration either when you could have concurrency issues between different builds.
Reproduce the error
Related issues
Suggest a Fix
Get rid of tabtab in install script and prompt the user for installing it or document it as a pro tip.
JHipster Version(s)
4.6.2
JHipster configuration
Entity configuration(s)
entityName.json
files generated in the.jhipster
directoryBrowsers and Operating System
The text was updated successfully, but these errors were encountered: