-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #770 from aashikam/annotation_fix
[7.x] Update compiler plugin to allow annotations
- Loading branch information
Showing
15 changed files
with
160 additions
and
55 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
[package] | ||
org = "ballerinax" | ||
name = "nats_tests" | ||
version = "2.9.0" | ||
version = "2.9.1" |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
4 changes: 4 additions & 0 deletions
4
compiler-plugin-tests/src/test/resources/ballerina_sources/invalid_service_30/Ballerina.toml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[package] | ||
org = "nats_test" | ||
name = "invalid_service_30" | ||
version = "0.1.0" |
28 changes: 28 additions & 0 deletions
28
compiler-plugin-tests/src/test/resources/ballerina_sources/invalid_service_30/service.bal
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com) All Rights Reserved. | ||
// | ||
// WSO2 LLC. licenses this file to you under the Apache License, | ||
// Version 2.0 (the "License"); you may not use this file except | ||
// in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, | ||
// software distributed under the License is distributed on an | ||
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
// KIND, either express or implied. See the License for the | ||
// specific language governing permissions and limitations | ||
// under the License. | ||
|
||
import ballerinax/nats; | ||
|
||
listener nats:Listener subscription = new(nats:DEFAULT_URL); | ||
|
||
@display { | ||
label: "natsService" | ||
} | ||
service nats:Service on subscription { | ||
|
||
remote function onMessage(nats:Message message) returns error? { | ||
} | ||
} |
4 changes: 4 additions & 0 deletions
4
compiler-plugin-tests/src/test/resources/ballerina_sources/valid_service_23/Ballerina.toml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[package] | ||
org = "nats_test" | ||
name = "valid_service_23" | ||
version = "0.1.0" |
55 changes: 55 additions & 0 deletions
55
compiler-plugin-tests/src/test/resources/ballerina_sources/valid_service_23/service.bal
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
// Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com) All Rights Reserved. | ||
// | ||
// WSO2 LLC. licenses this file to you under the Apache License, | ||
// Version 2.0 (the "License"); you may not use this file except | ||
// in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, | ||
// software distributed under the License is distributed on an | ||
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
// KIND, either express or implied. See the License for the | ||
// specific language governing permissions and limitations | ||
// under the License. | ||
|
||
import ballerinax/nats; | ||
|
||
listener nats:Listener subscription = new(nats:DEFAULT_URL); | ||
|
||
@display { | ||
label: "natsService" | ||
} | ||
service "demo.bbe" on subscription { | ||
|
||
remote function onMessage(nats:Message message) { | ||
} | ||
} | ||
|
||
@display { | ||
label: "natsService" | ||
} | ||
@nats:ServiceConfig { | ||
subject: "demo.bbe.*" | ||
} | ||
service nats:Service on subscription { | ||
|
||
remote function onMessage(nats:Message message) { | ||
} | ||
} | ||
|
||
nats:Client natsClient = check new(nats:DEFAULT_URL); | ||
listener nats:JetStreamListener streamSubscription = new(natsClient); | ||
|
||
@display { | ||
label: "natsService" | ||
} | ||
@nats:StreamServiceConfig { | ||
subject: "demo.bbe.*" | ||
} | ||
service nats:JetStreamService on streamSubscription { | ||
|
||
remote function onMessage(readonly & nats:JetStreamMessage message) { | ||
} | ||
} |
This file contains 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
This file contains 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
This file contains 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