Skip to content

feat: add best-effort compatibility builds for older IDEA versions - #1438

Merged
tangcent merged 3 commits into
masterfrom
feat/compat-builds
Aug 31, 2026
Merged

tangcent merged 3 commits into
masterfrom
feat/compat-builds

Conversation

@tangcent

@tangcent tangcent commented Aug 30, 2026

Copy link
Copy Markdown
Owner

Description

Only the default build (IDEA 2025.2+) ships to the JetBrains Marketplace, so users on older IDEA versions currently have no way to install the plugin at all. This PR parameterizes the IDEA compatibility range and produces an additional best-effort package covering IDEA 2022.1–2025.1 in every release and PR artifact.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactoring (no functional changes)
  • Documentation update
  • Performance improvement
  • Test coverage improvement

Related Issues

Refs #1434 — the reporter is on IDEA 2023.3.8, below the current supported minimum (2025.2), and upgrading is inconvenient for them.

@soldierjw — once the package workflow on this PR finishes, the Artifacts dropdown will list two ready-to-install zips:

  • easy-yapi-3.2.3.252.0.zip — IDEA 2025.2+
  • easy-yapi-3.2.3.221.251.zip — IDEA 2022.1–2025.1 (best-effort)

Download the one matching your IDEA version and install it via Settings → Plugins → ⚙ → Install Plugin from Disk — no extraction needed. Please give it a try on your project. (Referenced as Refs, not Fixes — this PR does not change the IPage export behaviour discussed there.)

Affected Area

  • YApi export
  • Postman export
  • Markdown export
  • Send HTTP request (Call)
  • API scanning / dashboard
  • Rule engine / custom rules / config
  • Settings / UI
  • Other / not user-facing

Changes Made

  • Parameterize the IDEA compatibility range: the plugin version now embeds the range as <base>.<since>.<until|0>, sourced from gradle.properties (pluginBaseVersion, pluginSinceBuild), overridable per invocation with -PpluginSinceBuild / -PpluginUntilBuild (0 = unbounded)
  • script/package.sh accepts a range argument (e.g. 221-251, '221-*'); script/release.sh bumps pluginBaseVersion in gradle.properties
  • Release and PR-package workflows build an additional best-effort package for IDEA 2022.1–2025.1; its failure emits a warning but never blocks the default artifact
  • The PR-package workflow uploads one artifact per package, named after the plugin zip and staged from the extracted distribution — each download is directly installable via "Install Plugin from Disk", no extraction needed; PR/issue comments list every artifact with its IDE range
  • Release notes generate a per-zip Downloads table listing the exact IDE range and support level of each package
  • README / README_CN: support matrix, where to download the compatibility build, and how to build a custom range
  • Replace the markdown issue templates with structured GitHub Issue Forms (the bug form now captures IDE version, framework, rule setup, and diagnostic logs up front)
  • PR template: add Affected Area, Architecture & Threading, and Logging checklists mirroring AGENTS.md
  • AGENTS.md: correct the platform-version claim (2025.2+, was 2023.1+), replace stale file:///Users/tangcent/... links with repo-relative links, document the Issue/PR conventions

How I Tested

  • ./gradlew test passes
  • Manual verification in a sandbox IDE (./gradlew runIde) — describe the entry action exercised
  • New tests added for new functionality

No production Kotlin code changed — this PR only touches build config, scripts, CI workflows, and docs. A local ./gradlew test run configured the build correctly and patchPluginXml produced the expected version 3.2.3.252.0 with since-build 252; the local test-JVM execution was cut short by a Windows page-file exhaustion error (native os::commit_memory failure on the dev machine, unrelated to these changes — every test that executed passed). The CI matrix on this PR runs the full ./gradlew test + buildPlugin.

Architecture & Threading Checklist

  • New code lives in the right bucket — no Kotlin code added; changes are build config, scripts, workflows, and docs only
  • PSI/VFS reads — N/A, no Kotlin code touched
  • Boundary classes self-protect — N/A, no Kotlin code touched
  • PSI writes and UI updates — N/A, no Kotlin code touched
  • No new launch(Dispatchers.Default) — N/A, no Kotlin code touched

Logging Checklist

  • Exactly one channel per event — N/A, no Kotlin code touched
  • No LOG.error, LOG.debug, LOG.trace, println, or printStackTrace() — N/A, no Kotlin code touched
  • Throwables passed as the last argument — N/A, no Kotlin code touched

General Checklist

  • My code follows the project's architecture principles
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works — N/A: build/CI/docs only, no runtime logic to unit-test; the version-range logic is exercised by the packaging workflows
  • New and existing unit tests pass locally with my changes — see How I Tested; the full suite runs in CI on this PR

Screenshots (if applicable)

N/A

Additional Notes

  • Compatibility outside the default range remains best-effort: compatibility packages are compiled against the newest platform and are not verified on older IDEs — the README documents this explicitly.
  • To add more compatibility tiers later, extend COMPAT_SINCE / COMPAT_UNTIL in release.yml / pr-package.yml.

Only the default build (IDEA 2025.2+) is published to the JetBrains
Marketplace; users on older IDEA versions had no way to install the
plugin at all.

Parameterize the IDEA compatibility range so additional best-effort
packages can be produced:

- plugin version now embeds the range as <base>.<since>.<until|0>,
  sourced from gradle.properties (pluginBaseVersion, pluginSinceBuild)
  and overridable per invocation with -PpluginSinceBuild /
  -PpluginUntilBuild; "0" means unbounded
- script/package.sh accepts a range argument (e.g. 221-251, '221-*');
  script/release.sh bumps pluginBaseVersion in gradle.properties
- release and PR workflows build a best-effort package covering IDEA
  2022.1-2025.1; its failure warns but never blocks the default
  artifact
- release notes generate a per-zip Downloads table listing the exact
  IDE range and support level of each package
- README/README_CN document the support matrix and how to build a
  custom range

Also replace the markdown issue templates with structured GitHub Issue
Forms (capturing IDE version, framework, rule setup, and diagnostic
logs up front) and extend the PR template with architecture, threading,
and logging checklists mirroring AGENTS.md.

Compatibility outside the default range remains best-effort: packages
are compiled against the newest platform and are not verified on older
IDEs.

Refs: #1434
@github-actions github-actions Bot added the type: new feature Add New Feature label Aug 30, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📦 Plugin has been packaged for this PR. You can download easy-yapi-3.2.3.252.0.zip from the GitHub Actions workflow run by clicking on the "Artifacts" dropdown. The artifact also contains a best-effort build for IDEA 2022.1–2025.1 — pick the zip matching your IDEA version.

@codecov

codecov Bot commented Aug 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 66.805%. Comparing base (4012e1f) to head (509611c).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##            master     #1438   +/-   ##
=========================================
  Coverage   66.805%   66.805%           
=========================================
  Files          468       468           
  Lines        27146     27146           
  Branches      6520      6520           
=========================================
  Hits         18135     18135           
  Misses        6544      6544           
  Partials      2467      2467           
Flag Coverage Δ
unittests 66.805% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4012e1f...509611c. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

The PR-package workflow put every built zip into a single artifact
named after the default package, and uploaded the raw zip files — so
GitHub wrapped them in another zip on download. Reporters had to
unzip twice, and the compatibility package had no artifact of its
own to pick from the Artifacts dropdown.

Root cause: one upload step with a glob path and a fixed artifact
name; the extract-before-upload step that produced directly
installable artifacts was dropped when the multi-range build was
introduced.

Solution: stage each distribution by extracting it to its own
directory and upload one artifact per package, named after the
plugin zip (easy-yapi-<base>.<since>.<until|0>). Each downloaded
artifact is a valid plugin zip — installable directly via "Install
Plugin from Disk", no extraction needed. PR and issue comments now
list every artifact with its IDEA range and mark the compatibility
package best-effort.

Impact: release workflow unchanged — release assets are uploaded
as-is and never double-zipped.

Refs: #1434
@github-actions

Copy link
Copy Markdown
Contributor

📦 Plugin has been packaged for this PR. You can download it from the GitHub Actions workflow run by clicking on the "Artifacts" dropdown:

  • easy-yapi-3.2.3.252.0.zip — IntelliJ IDEA 2025.2+ (officially supported)
  • easy-yapi-3.2.3.221.251.zip — IntelliJ IDEA 2022.1 – 2025.1 (best-effort, not verified on older IDEs)

Each artifact is a ready-to-install plugin zip — pick the one matching your IDEA version and install it via Settings → Plugins → ⚙ → Install Plugin from Disk. No extraction needed.

PRs are squash-merged, so the PR title becomes the merge-commit
subject, and script/release.sh groups changelog entries by the
feat/fix/refactor prefix. Until now the format was only an implicit
convention in git history: nothing in AGENTS.md, the PR template,
or the AI PR-creation flow stated it, so an AI-authored PR title
(#1438) came out unprefixed and would have landed ungrouped in the
changelog.

Codifying the rule in AGENTS.md makes it part of the workspace rules
injected into every AI session, closing the instruction-path gap
between commit messages (covered by the git-commit skill) and PR
titles (previously uncovered).
@tangcent tangcent changed the title Add best-effort compatibility builds for older IDEA versions feat: add best-effort compatibility builds for older IDEA versions Aug 30, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📦 Plugin has been packaged for this PR. You can download it from the GitHub Actions workflow run by clicking on the "Artifacts" dropdown:

  • easy-yapi-3.2.3.252.0.zip — IntelliJ IDEA 2025.2+ (officially supported)
  • easy-yapi-3.2.3.221.251.zip — IntelliJ IDEA 2022.1 – 2025.1 (best-effort, not verified on older IDEs)

Each artifact is a ready-to-install plugin zip — pick the one matching your IDEA version and install it via Settings → Plugins → ⚙ → Install Plugin from Disk. No extraction needed.

@tangcent
tangcent merged commit 62e3097 into master Aug 31, 2026
12 checks passed
@tangcent
tangcent deleted the feat/compat-builds branch August 31, 2026 00:34
@github-actions github-actions Bot mentioned this pull request Sep 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: new feature Add New Feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant