Skip to content

Conversation

@DilshadNaleem
Copy link

Purpose

Solving the compiler issue, changing the resource_func to resource_function
Fixes #<43815>

Approach

Creating a small function in ReachabilityAnalyzer.java inlcuding the NodeKind, and the return type.
Sorting some test cases, based on scenario.
Building the project using ./gradlew build -x test -x checkstyleMain -x checkstyleTest -x :build-config:checkstyle:downloadFile command skipping all the test, checkstyle sever error 404 founded so skip the checkstyles to but the codes are in that professional manner.
Extracting the zip file to the document folder, creating a dependency folder manually extracting the jar files inside the dependency folder to set my custom compiler

Samples

image image

Remarks

From 11/19/2025 the checkstyle server is down, then the to uplaod the cv to the wso2 portal the poral is down after submitting with choreo api error, in the official website it shows the captcha validaiton the terms but the view is not viisble

Check List

  • Read the Contributing Guide
  • Updated Change Log
  • Checked Tooling Support (#)
  • Added necessary tests
    • Unit Tests
    • Spec Conformance Tests
    • Integration Tests
    • Ballerina By Example Tests
  • Increased Test Coverage
  • Added necessary documentation
    • API documentation
    • Module documentation in Module.md files
    • Ballerina By Examples

@DilshadNaleem
Copy link
Author

@keizer619

@dulajdilshan
Copy link
Contributor

dulajdilshan commented Nov 21, 2025

@DilshadNaleem,

The PR title and commit messages do not follow the best practices we commonly use. Please follow Contribution Guidelines. Also, please check other closed PRs for a reference.

@dulajdilshan
Copy link
Contributor

When fixing an issue, use Fixes <issue_number> in the description as normal text. It will get linked correctly.

Comment on lines +8 to +9
'https://raw.githubusercontent.com/wso2/code-quality-tools/v1.4/checkstyle/jdk-14/checkstyle.xml',
'https://raw.githubusercontent.com/wso2/code-quality-tools/v1.4/checkstyle/jdk-14/suppressions.xml'
Copy link
Contributor

Choose a reason for hiding this comment

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

Why are we downgrading the JDK version here?

Copy link
Contributor

@dulajdilshan dulajdilshan Nov 21, 2025

Choose a reason for hiding this comment

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

Please use the appropriate JDK version to build the source code. See Build Ballerina from source.

Comment on lines +30 to +62
// The member represents a special error for unhandled exceptions from the
// compiler
BAD_SAD_FROM_COMPILER("BCE9999", "bad.sad.from.compiler"),

UNDEFINED_MODULE("BCE2000", "undefined.module"),
CYCLIC_MODULE_IMPORTS_DETECTED("BCE2001", "cyclic.module.imports.detected"),
UNUSED_MODULE_PREFIX("BCE2002", "unused.module.prefix"),
MODULE_NOT_FOUND("BCE2003", "module.not.found"),
REDECLARED_IMPORT_MODULE("BCE2004", "redeclared.import.module"),
INVALID_MODULE_DECLARATION("BCE2005", "invalid.module.declaration"),
MISSING_MODULE_DECLARATION("BCE2006", "missing.module.declaration"),
UNEXPECTED_MODULE_DECLARATION("BCE2007", "unexpected.module.declaration"),
REDECLARED_SYMBOL("BCE2008", "redeclared.symbol"),
REDECLARED_BUILTIN_SYMBOL("BCE2009", "redeclared.builtin.symbol"),
UNDEFINED_SYMBOL("BCE2010", "undefined.symbol"),
UNDEFINED_FUNCTION("BCE2011", "undefined.function"),
UNDEFINED_FUNCTION_IN_TYPE("BCE2012", "undefined.function.in.type"),
UNDEFINED_METHOD_IN_OBJECT("BCE2013", "undefined.method.in.object"),
UNDEFINED_FIELD_IN_RECORD("BCE2014", "undefined.field.in.record"),
UNDEFINED_CONNECTOR("BCE2015", "undefined.connector"),
INVALID_ERROR_REASON_TYPE("BCE2016", "invalid.error.reason.type"),
UNSUPPORTED_ERROR_REASON_CONST_MATCH(
"BCE2017", "error.match.over.const.reason.ref.not.supported"),
INVALID_ERROR_DETAIL_TYPE("BCE2018", "invalid.error.detail.type"),
ERROR_DETAIL_ARG_IS_NOT_NAMED_ARG("BCE2019", "error.detail.arg.not.named.arg"),
DIRECT_ERROR_CTOR_REASON_NOT_PROVIDED("BCE2020", "missing.error.reason"),
OBJECT_TYPE_NOT_ALLOWED("BCE2021", "object.type.not.allowed"),
OBJECT_TYPE_REQUIRED("BCE2022", "object.type.required"),
UNDEFINED_STRUCTURE_FIELD_WITH_TYPE("BCE2023", "undefined.field.in.structure.with.type"),
UNDEFINED_STRUCTURE_FIELD("BCE2024", "undefined.field.in.structure"),
TYPE_NOT_ALLOWED_WITH_NEW("BCE2025", "type.not.allowed.with.new"),
INVALID_INTERSECTION_TYPE("BCE2026", "invalid.intersection.type"),
UNSUPPORTED_TYPE_INTERSECTION("BCE2027", "unsupported.type.intersection"),
Copy link
Contributor

@dulajdilshan dulajdilshan Nov 21, 2025

Choose a reason for hiding this comment

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

Unnecessary and wrong indentation. Please check other places.

Comment on lines -119 to +120
private static final CompilerContext.Key<ReachabilityAnalyzer> REACHABILITY_ANALYZER_KEY =
new CompilerContext.Key<>();
private static final CompilerContext.Key<ReachabilityAnalyzer> REACHABILITY_ANALYZER_KEY
= new CompilerContext.Key<>();
Copy link
Contributor

Choose a reason for hiding this comment

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

Unnecessary change

Copy link
Author

Choose a reason for hiding this comment

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

ok sir sorry now i will change all these changes because i tried to solve the test cases, to build the whole project. the jdk version i downgrade it because after 3.30 am on the pull request day server founded 404 not found if the link was attached to the google directly it said 404 then again within time so many requests so to make my project work my last option was to downgrade then pull the pr request sir. now i will delete this pr then again folk the repo do the changes then i will re apply the changes

Comment on lines +570 to +592
<<<<<<< HEAD
public void visit(BLangFunction funcNode, AnalyzerData data) {
resetFunction(data);
if (funcNode.flagSet.contains(Flag.NATIVE)) {
return;
}
if (funcNode.body != null) {
analyzeReachability(funcNode.body, data);
boolean isNeverReturn = types.isNeverTypeOrStructureTypeWithARequiredNeverMember
(funcNode.symbol.type.getReturnType());
// If the return signature is nil-able, an implicit return will be added in Desugar.
// Hence, this only checks for non-nil-able return signatures and uncertain return in the body.
if (!funcNode.symbol.type.getReturnType().isNullable() && !isNeverReturn &&
!data.hasFunctionTerminated) {
Location closeBracePos = getEndCharPos(funcNode.pos);

String invokableName;

if (funcNode.getKind() == NodeKind.RESOURCE_FUNC) {
invokableName = "resource function";
} else {
invokableName = funcNode.getKind().toString().toLowerCase();
=======
Copy link
Contributor

Choose a reason for hiding this comment

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

It seems you have not resolved this conflict properly nor merged properly.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants