chore: set line.separator=\n in source-bearing bundles (step 2/3)#1353
Closed
joaodinissf wants to merge 1 commit into
Closed
chore: set line.separator=\n in source-bearing bundles (step 2/3)#1353joaodinissf wants to merge 1 commit into
joaodinissf wants to merge 1 commit into
Conversation
Add `.settings/org.eclipse.core.runtime.prefs` with `line.separator=\n` to every dsl-devkit bundle that has a `src/` directory and didn't already have one. This fixes Eclipse-side emission: `EclipseResourceFileSystemAccess2` honours the per-project `line.separator` preference when writing generated files inside Eclipse. Without it, the workspace default applies — CRLF on Windows by default — producing committed src-gen that fights `.gitattributes` and the project's LF convention. Step 1 of this stack fixed the MWE2 (Maven-side) path. This commit fixes the Eclipse (IDE-side) path. Step 3 will then be able to remove the `LfNormalizingFileSystemAccess` decorator, which exists purely to fight the now-superseded misconfiguration. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Collaborator
|
The additional preferences files should not be needed as they already exist as links in the workspace to the preferences in ddk-configuration. |
joaodinissf
added a commit
that referenced
this pull request
May 20, 2026
Delete `LfNormalizingFileSystemAccess.java` and remove its wrap calls from `CheckGenerator.xtend` and `CheckCfgGenerator.xtend`. The decorator was introduced in PR #1331 as a post-hoc normaliser against CRLF leaks from various emission paths. After: - step 1 of this stack (#1352) — `.mwe2` `lineDelimiter` and `ddk-configuration` runtime prefs both flipped to `\n` - step 2 (#1353) — `line.separator=\n` propagated to every source-bearing bundle's `.settings/org.eclipse.core.runtime.prefs` - the preceding commit on this branch — `KeywordAnalysisHelper` no longer uses `PrintWriter.println()` …every emission path now produces LF natively. The wrapper is no-op work and the conditional `instanceof IFileSystemAccess2` cast it introduced is no longer needed. Closes #1345 — the planned extension of the same wrapper to `Scope` / `Format` / `Export` generators is no longer needed for the same reason. Those generators are already clean of `Strings.newLine()`, `System.lineSeparator()`, and hardcoded `"\r\n"` emission (audited). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Step 2 of the LF-alignment stack. Fixes Eclipse-side emission (the IDE save path).
Adds
.settings/org.eclipse.core.runtime.prefsto 59 source-bearing bundles (every bundle with asrc/directory that didn't already have one). Each new file is two lines:Why
EclipseResourceFileSystemAccess2(the FSA Xtext uses when generating from inside Eclipse) honours the project'sline.separatorpreference. Without it, the workspace default applies — on Windows that's CRLF — producing committed src-gen that fights.gitattributesand the project's LF convention.This is the second layer of the same fix:
LfNormalizingFileSystemAccess(PR fix: normalize line endings in check generators #1331) and close Extend LF line-ending normalization to remaining runtime generators #1345Only one bundle (
ddk-configuration) had this preference before this PR, and step 1 fixed its previously-CRLF value. This PR propagates it to the remaining 59.Excluded bundles (intentionally)
ddk-target,ddk-repository,*.featurebundles — nosrc/directory, no code emission.Stack
Stacked on
chore/emit-lf-step-1(#1352). When step 1 merges, GitHub auto-retargets this PR's base tomaster.Verification
mvn clean verify -T 3C -f ./ddk-parent/pom.xmlis expected to pass — Maven ignores Eclipse-only.settings/content..check/.checkcfg/.scope/.format/.exportfile in Eclipse should produce LF output natively (without theLfNormalizingFileSystemAccessdecorator). This is the precondition for step 3.