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

ABP CLI: WARN for prerequirements #17473

Closed
hikalkan opened this issue Aug 24, 2023 · 1 comment · Fixed by #17669
Closed

ABP CLI: WARN for prerequirements #17473

hikalkan opened this issue Aug 24, 2023 · 1 comment · Fixed by #17669

Comments

@hikalkan
Copy link
Member

hikalkan commented Aug 24, 2023

There are some prerequisites to be able to create, build and run the ABP startup templates.

For example https://docs.abp.io/en/abp/latest/Getting-Started-Setup-Environment?UI=MVC&DB=EF&Tiered=Yes

Requirements for that solution configuration:

If users create such a solution (tiered, MVC, EF Core), we can check these requirements and WARN the user before and after creating the project.

We may skip the IDE check; maybe they won't use an IDE; however, without Node, solution creation will fail because it will not be able to install client-side packages. That list also needs to be included. For example, EF Core command line tools (dotnet ef ...) is also a requirement because we are creating the initial migrations.

So, these are required to create such a solution. We can show a colorful WARNING message (background = black, foreground = yellow) (message can be "WARNING: The following tools should be installed on this machine to be able to successfully create this solution. Otherwise, you may get errors on solution creation process.") and ask the user to either cancel the operation or continue BEFORE starting the solution creation process (if they continue, they will probably get an error, but let them go if they want).

There are also some requirements needed not to create the solution but to run it. For example, Redis, in this list, is such a requirement. We should show a colorful WARNING message (message can be "NOTICE: The following tools is required to run your solution.") AFTER creating the solution if we can not detect a local Redis instance.

EF Core, for example, can be auto-installed by ABP CLI, if not found in the computer.

So, with this issue;

  • Auto-install some dependencies (EF Core is a good example, but installing Redis is not a good idea, and installing Node may not be easy/possible), so do your best.
  • Show a WARNING for some missing dependencies (required to create the solution) BEFORE solution creation, and let the user to continue or cancel.
  • Show a WARNING for some missing dependencies (required to run the solution) AFTER solution creation. No use action in that case, exit from CLI as normal.

Notice that dependencies may vary based on the solution preferences.

@maliming
Copy link
Member

We have NpmHelper and DotnetEfToolManager and they will install node, yarn, dotnet-ef.

We only need to check the Redis(127.0.0.1)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants