Skip to content

chore(flow-polymer2lit): drop commons-io and commons-text dependencies - #27608

Open
totally-not-ai[bot] wants to merge 3 commits into
mainfrom
chore/polymer2lit-drop-commons
Open

totally-not-ai[bot] wants to merge 3 commits into
mainfrom
chore/polymer2lit-drop-commons

Conversation

@totally-not-ai

@totally-not-ai totally-not-ai Bot commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

refactor · flow-polymer2lit, flow-plugin-base · projects using the Maven or Gradle plugin

The Polymer-to-Lit converter pulled in commons-io and commons-text (plus commons-lang3) only to read a file and fill four small code templates. Both libraries are now gone from the converter; the JDK does the same work. The plugin base module, which uses commons-io itself and silently got it through the converter, now declares it directly.

Risks:

  • ⚠️ commons-text and commons-lang3 are no longer on the Maven/Gradle plugin classpath through flow-polymer2lit; commons-io stays, now via flow-plugin-base.

  • ✅ No public API, behaviour, security, memory, serialization, threading or performance impact.

  • Replaced IOUtils.toString in FrontendConverter and ServerConverter with a JDK read that keeps the same UTF-8 decoding with replacement of malformed bytes.

  • Replaced StringSubstitutor in the generated getter/setter code of ServerConverter with string concatenation; output is unchanged.

  • Removed commons-io and commons-text from flow-polymer2lit/pom.xml.

  • Added a direct commons-io dependency to flow-plugin-base, which uses it in its own main code.

  • Extended the getter/setter snapshot test with a String getter and an int property; the expected output was generated with the previous code.

flow-plugin-base uses commons-io in its own main code but only got it
transitively through flow-polymer2lit, so it now declares it directly.

Decode converter input with UTF-8 replacement like before instead of
Files.readString, which throws on malformed input.

Extend the getter/setter snapshot test with a String getter and an int
property, generated with the previous StringSubstitutor-based code.
@totally-not-ai
totally-not-ai Bot requested a review from Artur- December 1, 2026 20:45
@totally-not-ai

totally-not-ai Bot commented Dec 1, 2026

Copy link
Copy Markdown
Contributor Author

Type of change

  • Internal change

@Artur-
Artur- marked this pull request as ready for review December 1, 2026 20:46
@github-actions github-actions Bot added the +0.0.1 label Dec 1, 2026
@github-actions

github-actions Bot commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

Test Results

 1 655 files  ±0   1 746 suites  ±0   1h 57m 4s ⏱️ + 10m 35s
14 074 tests ±0  14 002 ✅ ±0  72 💤 ±0  0 ❌ ±0 
14 500 runs  ±0  14 428 ✅ ±0  72 💤 ±0  0 ❌ ±0 

Results for commit d67b8b4. ± Comparison against base commit 1e15ac4.

♻️ This comment has been updated with latest results.

@sonarqubecloud

sonarqubecloud Bot commented Dec 2, 2026

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
78.9% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@vaadin-review-bot vaadin-review-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Nothing to flag — the changes look good.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants