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

"Skipping ignored file" warnings in case of conditional folder #932

Open
raquo opened this issue Dec 8, 2024 · 0 comments
Open

"Skipping ignored file" warnings in case of conditional folder #932

raquo opened this issue Dec 8, 2024 · 0 comments

Comments

@raquo
Copy link

raquo commented Dec 8, 2024

steps

This can be reproduced e.g. with sbt new raquo/scalajs.g8 and then choosing n for CSS.

All you need is to have a non-empty conditional folder named like $if(include_CSS.truthy)$.$endif$, and for the condition to not match.

sbt or Giter8 version:

sbt --version
sbt version in this project: 1.10.2
sbt script version: 1.10.2

problem

If the condition in the conditional folder is not satisfied, giter8 prints warnings like this:

sbt new file:///Users/raquo/code/scala/scalajs-laminar.g8
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
name [my-app]: demo
package [example]:
dev_server_port [3333]:
include_laminar [Y/n]: y
include_CSS [Y/n]: n
Skipping ignored file: /var/folders/m5/7v96psjx2djg62n0zjd_93f00000gn/T/giter8-315401690193583/src/main/g8/$if(include_CSS.truthy)$.$endif$/style.css
Skipping ignored file: /var/folders/m5/7v96psjx2djg62n0zjd_93f00000gn/T/giter8-315401690193583/src/main/g8/src/main/scala/$package$/$if(include_laminar.truthy)$.$endif$/$if(include_CSS.truthy)$.$endif$/HelloWorld.less
Skipping ignored file: /var/folders/m5/7v96psjx2djg62n0zjd_93f00000gn/T/giter8-315401690193583/src/main/g8/src/main/scala/$package$/$if(include_laminar.truthy)$.$endif$/$if(include_CSS.truthy)$.$endif$/Main.less

Template applied in /Users/raquo/code/scala/TEST/./demo

expectation

Folder condition not matching is not a problem or an edge case, it's normal operation, so there should be no warnings.

The warnings look like errors indicating a problem, especially to newbies who are likely to use these giter8 templates.

notes

The error is printed here. Not sure if there are any other usages of this log, or if it could just be replaced with .foreach.

Screenshot 2024-12-08 at 5 41 05 AM
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant