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

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

Closed
1 task done
zWrightKaplan opened this issue Nov 15, 2023 · 2 comments
Closed
1 task done

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

zWrightKaplan opened this issue Nov 15, 2023 · 2 comments

Comments

@zWrightKaplan
Copy link

zWrightKaplan commented Nov 15, 2023

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
+-- [email protected] -> .\decaUtilCrud
| `-- [email protected]
`-- [email protected] -> .\decaUtil
  `-- [email protected] 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

  • Checking this box is mandatory (this is just to show you read everything)
Copy link
Contributor

github-actions bot commented Nov 15, 2023

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
Copy link
Member

mshima commented Nov 15, 2023

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

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

No branches or pull requests

4 participants