Fix: Compile classlib annotations before core sources - #1
Draft
mo-dev-studio-eg wants to merge 1 commit into
Draft
Fix: Compile classlib annotations before core sources#1mo-dev-studio-eg wants to merge 1 commit into
mo-dev-studio-eg wants to merge 1 commit into
Conversation
This fix ensures the org.jnode.annotation package is compiled and packaged into classlib.jar before the main core compilation starts. The build was failing because: - classlib.jar was expected to contain annotation classes - But the classlib sources in core/src/classlib/ were never compiled - This caused 'package org.jnode.annotation does not exist' errors Changes: - Add compile-classlib target that compiles classlib sources first - The compile target now depends on compile-classlib - classlib.jar is created from the compiled classlib classes
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.
Description
This fix ensures the
org.jnode.annotationpackage is compiled and packaged intoclasslib.jarbefore the main core compilation starts.Problem
The build was failing with errors like:
The
org.jnode.annotationpackage (containing annotations like@MagicPermission,@SharedStatics,@Uninterruptible, etc.) is located incore/src/classlib/org/jnode/annotation/, but these sources were never being compiled intoclasslib.jarbefore the main core sources were compiled.Solution
Modified
core/build.xmlto:Added properties for classlib compilation:
my-classlib-classes.dir- directory for compiled classlib classesclasslib.jar- location for the classlib jar fileCreated a new
compile-classlibtarget that:core/src/classlib/classlib.jarUpdated the
compiletarget to depend oncompile-classlibinstead of justprepareThis ensures the annotation classes are available in
classlib.jarbefore the main core compilation begins.Testing
Run:
./build.sh -Djnode.local.classlib=true assembleThis PR was created by an AI agent (OpenHands) on behalf of the user.
@mo-dev-studio-eg can click here to continue refining the PR