Skip to content

jhipster:bootstrap generator cannot use projects configuration in commit logic. #34309

Description

@mshima
Overview of the issue

The bootstrap generator may use a different destinationRoot than the target project. As a result, the jhipsterConfig available during bootstrap execution may not reflect the actual project configuration.

Currently, the bootstrap generator relies on jhipsterConfig for three features:

  • autoCrlf
  • removeNeedles
  • prettier-java
Proposed fixes
  • prettier-java: Introduce a dedicated bootstrap property to enable prettier-java, instead of relying on jhipsterConfig. That property will be enable by java-simple-application (or :bootstrap) generator.
  • removeNeedles: convert into a bootstrap generator flag.
  • autoCrlf: convert into a runtime-only option and enable it by default on Windows.
  • Bootstrap validation: Throw an error whenever jhipsterConfig is accessed from within the bootstrap generator to prevent incorrect assumptions about the target project configuration.
  • removeNeedles: project-specific solution is to rely on the upstream mem-fs-editor support proposed in Feature request: Allow mem-fs-editor actions to pass file meta stored on mem-fs Vinyl files SBoudrias/mem-fs#67.
  • autoCrlf: git root awareness should be implemented using file metadata
JHipster Version(s)

main

Browsers and Operating System
  • Tickets opened without reproduction steps or that don't follow the template recommendation will be closed.
  • This issue is prompt-related or an error that prevents JHipster from generating an application.
  • I don't have a JDL otherwise I should open an JDL Issue
  • The application is not successfully generated otherwise, I should open an Issue with jhipster info
  • Checking this box is mandatory (this is just to show you read everything)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions