apache / apache/lucene

(build) strange "/generated" folders show up out of nowhere [LUCENE-9520]

Open
#10,560 1 comment 0 reactions 0 assignees View on GitHub
legacy-jira-priority:Major type:bug
Dominant language
Java
Stars
3.6k
Forks
1.4k
Avg merge
2d 11h
Merged PRs (30d)
88

Description

Precommit has been failing for me recently with odd exceptions like this:

```Java
* What went wrong:
Execution failed for task ':checkWorkingCopyClean'.
> Working copy is not a clean git checkout (skip with -Pvalidation.git.failOnModified=false), offending files:
- lucene/analysis/common/src/java/generated (untracked)
- lucene/codecs/src/java/generated (untracked)
- lucene/core/src/java/generated (untracked)
- lucene/highlighter/src/java/generated (untracked)
- lucene/highlighter/src/test/generated_tests (untracked)
- lucene/memory/src/java/generated (untracked)
- lucene/queries/src/java/generated (untracked)
- lucene/queryparser/src/java/generated (untracked)
- lucene/sandbox/src/java/generated (untracked)
- lucene/test-framework/src/java/generated (untracked)
```

Don't know where the "generated" folder comes from. IntellIJ is the primary suspect but I'm not 100% sure.

---
Migrated from [LUCENE-9520](https://issues.apache.org/jira/browse/LUCENE-9520) by Dawid Weiss (@dweiss)

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the precommit failure and inspecting the listed untracked generated directories. Trace which build or development process creates them, with IntelliJ mentioned as a possible source. Done means the unexpected directories no longer appear and checkWorkingCopyClean passes without disabling validation.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.