jhipster / generator-jhipster

JHipster is a development platform to quickly generate, develop, & deploy modern web applications & microservice architectures.
https://www.jhipster.tech
Apache License 2.0
21.54k stars 4.02k forks source link

.yo-resolve file not working in version 8.0.0 #24244

Closed zWrightKaplan closed 11 months ago

zWrightKaplan commented 11 months ago
Overview of the issue

With version 8.0.0 the .yo-resolve file seems to of stopped working for me. It will work for 8.0.0-rc1.

The .yo-resolve file seems to be entirely ignored and will not skip over files specified

Motivation for or Use Case

While developing I often have to generate with jhipster again to add new entities and such. I use the .yo-resolve file in order to keep files I have modified while allowing jhipster to add the new files. Without it I would have to redo all of my work on modified classes.

Reproduce the error

Here is a basic .yo-resolve file which works fine in 8.0.0-rc1 but not 8.0.0

Having issues handling new lines but after each skip is a new line (not sure if this matters in the resolve file itself) src/main/resources/config/application.yml skip src/main/resources/config/application-dev.yml skip src/main/resources/config/application-prod.yml skip

1) make sure you are using version jhipster version 8.0.0 2) generate app from jdl file (doesnt seem to matter what the app is but mine is listed down below) 3) modify the application.yml and application-dev.yml in any way 4) create .yo-resolve file and enter lines previously stated 5) run jhipster jdl myJdlFileName.jdl --monorepository --workspaces

Related issues

I have not found any issues listed, I also tried seeking help on Gitter and Stack Overflow to see if anyone else has ran into the issue with no avail

Suggest a Fix

Not much I can give with a suggestion other than simply changing my version to 8.0.0-rc1 will make the .yo-resolve file work. So the problem had to be introduced in the builds between 8.0.0-rc1 and 8.0.0

JHipster Version(s)

My Jhipster version is 8.0.0

JHipster configuration

WARNING! Since JHipster v8, the jhipster command will not use the locally installed generator-jhipster. If you want to execute the locally installed generator-jhipster, run: npx jhipster

    ██╗ ██╗   ██╗ ████████╗ ███████╗   ██████╗ ████████╗ ████████╗ ███████╗
    ██║ ██║   ██║ ╚══██╔══╝ ██╔═══██╗ ██╔════╝ ╚══██╔══╝ ██╔═════╝ ██╔═══██╗
    ██║ ████████║    ██║    ███████╔╝ ╚█████╗     ██║    ██████╗   ███████╔╝

██╗ ██║ ██╔═══██║ ██║ ██╔════╝ ╚═══██╗ ██║ ██╔═══╝ ██╔══██║ ╚██████╔╝ ██║ ██║ ████████╗ ██║ ██████╔╝ ██║ ████████╗ ██║ ╚██╗ ╚═════╝ ╚═╝ ╚═╝ ╚═══════╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══════╝ ╚═╝ ╚═╝ https://www.jhipster.tech Welcome to JHipster v8.0.0-rc.1

Welcome to the JHipster Information Sub-Generator

master@ C:\Workspace\GitRepos\Utilities\DecaUtil\master
+-- deca-util-crud@0.0.1-SNAPSHOT -> .\decaUtilCrud
| `-- generator-jhipster@8.0.0-rc.1
`-- deca-util@0.0.1-SNAPSHOT -> .\decaUtil
  `-- generator-jhipster@8.0.0-rc.1 deduped
JHipster configuration, a .yo-rc.json file generated in the root folder
.yo-rc.json file
{
  "generator-jhipster": {
    "appsFolders": [
      "decaUtil",
      "decaUtilCrud"
    ],
    "baseName": "workspaces",
    "clientPackageManager": "npm",
    "directoryPath": "./",
    "dockerCompose": true,
    "entities": [],
    "jhipsterVersion": "8.0.0-rc.1",
    "monorepository": true
  }
}
Environment and Tools

openjdk version "17.0.7" 2023-04-18 LTS OpenJDK Runtime Environment Microsoft-7626293 (build 17.0.7+7-LTS) OpenJDK 64-Bit Server VM Microsoft-7626293 (build 17.0.7+7-LTS, mixed mode, sharing)

git version 2.38.0.windows.1

node: v18.18.0 npm: 9.8.1

Docker version 20.10.22, build 3a2c30b

JDL for the Entity configuration(s) entityName.json files generated in the .jhipster directory
JDL entity definitions

Here is what I had for a jdl file

`application { config { applicationType monolith packageName com.kelc.capl.gateway.admin baseName decaUtil serverPort 9092 reactive true authenticationType oauth2 buildTool maven databaseType sql devDatabaseType mssql prodDatabaseType mssql clientFramework angular serviceDiscoveryType consul testFrameworks [cypress] enableTranslation true nativeLanguage en languages [en, es] } entities Program, Site, DecaUser, ImpColumnName, ImpEntityType }

application { config { applicationType monolith packageName com.kelc.capl.gateway.admin.crud baseName decaUtilCrud serverPort 9092 reactive true authenticationType oauth2 buildTool maven databaseType sql devDatabaseType mssql prodDatabaseType mssql clientFramework angular serviceDiscoveryType consul testFrameworks [cypress] enableTranslation true nativeLanguage en languages [en, es] } entities Program, Site, DecaUser, ImpColumnName, ImpEntityType }

entity Program(Program) { @id programid Long programname String required minlength(3) maxlength(50) contactname String maxlength(100) organizationname String maxlength(50) childplusagencyid UUID }

entity Site(site) { @id siteid Long programid Long sitename String maxlength(50) status String maxlength(1) sitetype String maxlength(1) }

entity DecaUser(users) { @id userid Long programid Long username String maxlength(50) status String maxlength(1) fname String maxlength(20) lname String maxlength(20) usertype String maxlength(1) email String maxlength(70) }

entity ImpColumnName(util_imp_table_columns) { @id headerId Long columnName String maxlength(50) displayName String maxlength(50) description String maxlength(50) isRequired String maxlength(1) entityTypeInstID Long }

entity ImpEntityType(util_imp_entity_types) { @id instId Long entityName String maxlength(50) displayName String maxlength(50) description String maxlength(50) }

paginate * with pagination

deployment { deploymentType docker-compose serviceDiscoveryType consul dockerRepositoryName "decaUtilMonolith" }

dto with mapstruct service with serviceClass filter * except User `

Entity configuration(s) entityName.json files generated in the .jhipster directory

This does not apply to my issue

Browsers and Operating System

Windows 11 Not really a browser issue so doesnt apply

github-actions[bot] commented 11 months ago

JHipster has completed the sample check .yo-rc.json: valid Entities JDL: blank Application: successfully generated Frontend check: success Backend check: success E2E check: success

mshima commented 11 months ago

The logic is inverted in 8.0.0 release. Already fixed in main. As workaround use --skip-yo-resolve option.