JSBML fork upgrade plan: catch up to upstream, and what to send back
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 42/100
- Loại issue
- Tái cấu trúc
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- java
- Lĩnh vực
- backend, build-system
Hướng nghiên cứu
Start with Step 0: add jitpack.yml with jdk: openjdk8 in the fork (virtualcell/vcell-jsbml), since the build log quoted here shows publish silently relies on JitPack's JDK 8 default and -DskipTests. Then read the root pom's jsbml.version and the two cited issues #1461 and #1971 to see which fork patch survives an upgrade. Done means the fork delta is down to the single ParserManager.getManager() synchronization patch, with the other candidates individually verified against vcell-core usage before porting.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
We carry a fork of JSBML at virtualcell/vcell-jsbml, consumed via JitPack as com.github.virtualcell.vcell-jsbml:{jsbml-core,jsbml-spatial} (jsbml.version in the root pom, currently 1.6.1-VCELL-4). This issue is the plan for catching that fork up to upstream, and the list of changes worth sending upstream.
Filed after #1461 and #1971 — two bugs whose fixes sat in the fork for months without reaching a published artifact.
Where we are
Fork master vs sbmlteam/jsbml master: 23 ahead, 122 behind. Of the 122, 68 touch core/src, which is what we actually consume:
| area | commits |
|---|---|
util |
28 |
math |
12 |
xml |
10 |
AbstractSBase.java |
7 |
ext, validator, SBase, SBMLDocument, ASTNode, … |
rest |
The "23 ahead" overstates our divergence — it counts the cherry-picks from the recent master/aot-pipeline reconciliation. The real patch set is small: two functional changes, plus release plumbing (version stamps, JitPack config, two commented-out ext/comp tests).
Upstream's last release is jsbml-1.6.1, dated 2022-01-10 — four and a half years ago. Their master is active (commits within the last two weeks) but sits unreleased at 1.7-SNAPSHOT. So "catching up" means tracking an unreleased branch, not taking a newer release. That is the central tension in everything below.
Our two patches, and what upstream has done about them
1. The annotation ClassCastException guard (#1461) — upstream has fixed this, better than we did.
0454dce6 (upstream PR #264, #282) guards the same cast. Theirs is a strict superset of ours:
if (lastElement instanceof Annotation) { // ← our guard
Object parent = annotation.getParent();
if (parent instanceof SBase) { // ← additional guard we do NOT have
for (AnnotationReader annoReader : annotationParsers) { ... }
} else {
logger.error("...expected parent of Annotation to be an SBase but found " + ...);
}
} else {
logger.error("...expected top stack element to be an Annotation but found " + ...);
}
They also log the offending type instead of a bare message, and ship a test (SBMLReaderAnnotationCastTest). On upgrade we drop our patch entirely and gain a guard. Ours was written first; theirs is the one to keep.
2. The ParserManager concurrency fix (#1971) — upstream still does not have this.
getManager() on upstream master today:
public static ParserManager getManager() { // still unsynchronized
if (manager == null) { manager = new ParserManager(); }
return manager;
}
with the same static, single-use ServiceLoader iterators at lines 48/53. This is the one patch a catch-up would not obtain, and therefore the one worth sending upstream.
Concrete changes to send upstream
Ordered by how ready each is.
-
Synchronize
ParserManager.getManager()— ready now. One word, already written and tested in the fork (virtualcell/vcell-jsbml#3, #4). Draft issue text is on #1971 and has not been filed. Precedent is good: their #195 ("XMLNode.convertStringToXMLNode is not thread safe", the same static-but-stateful shape) was fixed within days. -
Finish or revert the slf4j introduction. Upstream's
core/pom.xmlnow declaresslf4j-api1.7.32, but exactly one file (AbstractSBase.java) imports slf4j while 82 still importorg.apache.log4j. That looks like an unfinished migration rather than a decision, and it puts two logging frameworks in a library's dependency set. Worth asking what the intent is before we inherit it. (Not urgent for us: VCell already hasslf4j-api2.0.16 and thelog4j-1.2-apibridge on the classpath, so both routes already work — though note the version skew, upstream declares 1.7.32.) -
Cut a release. The most valuable thing upstream could do for every downstream consumer, and the thing that would let us drop the fork. Four and a half years of fixes are stranded in
1.7-SNAPSHOT. Worth asking about plans rather than assuming. -
Java 7 source/target.
jsbml-build.propertiesstill sets1.7, which no longer compiles under a modern JDK — building the fork locally needs-Djsbml.build.javac.source=8 -Djsbml.build.javac.target=8. Only reason this has not bitten us is that JitPack's default image is JDK 8 (see the risk below).
Plan for the fork
Do not do the 122-commit catch-up as a single step, and do not treat it as a goal in itself. SBML import is the path every BioModel import goes through; the payoff has to be identified, not assumed.
Proposed sequence:
-
Step 0 — pin the build. Add a
jitpack.ymlwithjdk: openjdk8. Today there is none, and the publish pipeline silently depends on JitPack's default image happening to be JDK 8. From the1.6.1-VCELL-4build log:Java version: 1.8.0_292 … Running: ./mvnw clean install -DskipTests. If that default moves forward, our tags stop building withSource option 7 is no longer supported, and we find out the next time we need to cut a release. Cheap, no behaviour change, do it first. Also worth noting from the same log:-DskipTests, so nothing in the publish path runs the fork's tests — which is why the VCell-side test added in #1974 is the one that actually guards us. -
Step 1 — file the
ParserManagerfix upstream (needs @jcschaff's go-ahead; draft is on #1971). -
Step 2 — evaluate the 68
core/srccommits for anything we actually want. Candidates spotted, none yet assessed:2aa8efd4prevent infinite recursion inExpandFunctionDefinitionConverter076bf2b3operator precedence brackets inFormulaCompiler(their #259)b4e8a414unary minus / NOT precedence in theASTNodeformula parser (their #249)4788407bASTNode NPE;fe7bc4f1/92676005derived-units NPEs;4fc4380eIndexOutOfBoundsExceptioninUnitsCompiler.lambda44412ad8strict namespace URI checking for plugins (their #216) — behaviour change, could reject documents we currently accept- XStream 1.4.20 → 1.4.21 (XStream has a CVE history; worth checking whether the bump matters to us)
Relevance check, so nobody over-reads that list:
ASTNodeis referenced directly in 15 vcell-core main-source files, butFormulaCompiler,UnitsCompilerandExpandFunctionDefinitionConverterare referenced in none — they would only be reached indirectly. The precedence fixes sound alarming (wrong math is worse than a crash), but whether any of them changes a formula VCell actually produces is unverified. Verify before porting; port individually rather than merging the branch. -
Step 3 — only if step 2 finds something we need, do the full merge, on a branch, gated on the BMDB nightly suite rather than on the Fast group. That suite is the only thing that exercises SBML import at scale.
Risks worth stating plainly
- Tracking an unreleased branch.
1.7-SNAPSHOThas not been release-qualified by upstream. Taking it wholesale moves VCell's SBML import onto a dev branch. 44412ad8strict namespace checking could turn models that import today into models that do not. The BMDB nightly is the instrument that would catch it.- Pom conflicts are now expected and fine. Since the fork's
mastercarries1.6.1-VCELLversion stamps where upstream has1.7-SNAPSHOT, any upstream merge conflicts on the poms. Trivial and localized — and far better than the previous arrangement, where a branch nothing shipped from hid two fixes for seventeen months.
Definition of done
Not "fork deleted" — that needs an upstream release we do not control. The reachable goal is fork delta reduced to one patch (ParserManager), so that dropping the fork becomes a version bump on the day upstream cuts a release.
- Ngôn ngữ chính
- Java
- Star
- 140
- Fork
- 35
- Merge trung bình
- 11 giờ 28 phút
- Pull request đã merge (30 ngày)
- 19
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của virtualcell/vcell
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
virtualcell/vcell#2193 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Accessibility Requirement Java-based User Interface
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
virtualcell/vcell#2138 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Accessibility Requirement Java-based
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
virtualcell/vcell#2137 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Accessibility Requirement User Interface
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
virtualcell/vcell#2135 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Accessibility Requirement Java-based User Interface
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
virtualcell/vcell#2134 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của virtualcell/vcell
Issue tương tự
-
needs-area-label
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
Maintainer thường phản hồi trong vòng 2 ngày
-
enhancement Java macOS
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
freerouting/freerouting#1079 ·
Maintainer thường phản hồi trong vòng 4 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
apache/maven-enforcer#1074 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Gradle liquibaseDiffChangelog drops jhi_date_time_wrapperCó thể đã có người làm @mraible đã nhận hôm nay. Đang mởarea: triage theme: undefined
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
jhipster/generator-jhipster#35998 ·
Maintainer thường phản hồi trong vòng 1 ngày