Skip to content

Commit f53a97e

Browse files
Remove support for @feed annotations (#503)
* Refs #23701. Remove support for input feeds. Signed-off-by: Miguel Company <[email protected]> * Refs #23701. Remove support for result feeds. Signed-off-by: Miguel Company <[email protected]> * Refs #23701. Update dds-types submodule. Signed-off-by: Miguel Company <[email protected]> * Refs #23701. Exclude IDLs with `@feed` from tests. Signed-off-by: Miguel Company <[email protected]> --------- Signed-off-by: Miguel Company <[email protected]>
1 parent b3e70c8 commit f53a97e

File tree

4 files changed

+30
-7
lines changed

4 files changed

+30
-7
lines changed

.github/workflows/reusable-ubuntu-ci.yml

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,14 @@ on:
5959
required: false
6060
type: boolean
6161
default: false
62+
blacklist_idls:
63+
description: 'Comma-separated list of tests to be blacklisted'
64+
required: false
65+
type: string
66+
default: 'interfaces,interfaces_2'
67+
env:
68+
blacklist_tests: ${{ inputs.run-tests && inputs.blacklist_idls }}
69+
gradle-test-flags: ${{ inputs.blacklist_idls && format('-Dblacklist_tests={0}', inputs.blacklist_idls) }}
6270
defaults:
6371
run:
6472
shell: bash
@@ -220,11 +228,27 @@ jobs:
220228
run: |
221229
source ${{ github.workspace }}/install/local_setup.bash
222230
cd ${{ github.workspace }}/src/fastddsgen
223-
./gradlew test
231+
./gradlew test ${{ env.gradle-test-flags }}
224232
225233
- name: Test fastddsgen with python arg
226234
if: ${{ inputs.run-tests == true }}
227235
run: |
228236
source ${{ github.workspace }}/install/local_setup.bash
229237
cd ${{ github.workspace }}/src/fastddsgen/thirdparty/dds-types-test/IDL
230-
find . -path "*.idl*" -exec fastddsgen -python {} +
238+
# Example: blacklist_tests='file1,file1'
239+
IFS=',' read -r -a BL <<< "${{ env.blacklist_tests }}"
240+
241+
# Build exclusion: ! ( -name file1.idl -o -name file2.idl )
242+
EXCL=()
243+
for f in "${BL[@]}"; do
244+
[[ -n "$f" ]] && EXCL+=(-name "${f}.idl" -o)
245+
done
246+
# Drop trailing -o if present
247+
((${#EXCL[@]})) && unset 'EXCL[${#EXCL[@]}-1]'
248+
249+
# Run find: match *.idl files, exclude blacklist, and batch fastddsgen calls
250+
if ((${#EXCL[@]})); then
251+
find . -type f -name '*.idl' ! \( "${EXCL[@]}" \) -exec fastddsgen -python {} +
252+
else
253+
find . -type f -name '*.idl' -exec fastddsgen -python {} +
254+
fi

src/main/java/com/eprosima/fastdds/idl/grammar/Interface.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
import com.eprosima.fastdds.idl.grammar.Operation;
1818
import com.eprosima.fastdds.idl.parser.typecode.EnumTypeCode;
1919
import com.eprosima.fastdds.idl.parser.typecode.StructTypeCode;
20+
import com.eprosima.idl.parser.exception.ParseException;
2021
import com.eprosima.idl.parser.typecode.Member;
2122
import com.eprosima.idl.parser.typecode.EnumMember;
2223
import com.eprosima.idl.parser.typecode.TypeCode.ExtensibilityKind;
@@ -40,7 +41,7 @@ public void add(com.eprosima.idl.parser.tree.Export exp)
4041
Operation op = (Operation)exp;
4142
if (op.isAnnotationFeed())
4243
{
43-
m_hasOutputFeeds = true;
44+
throw new ParseException(null, "Support for result feeds is part of Fast DDS Pro");
4445
}
4546

4647
if (op.getOutputparam().size() > 0)

src/main/java/com/eprosima/fastdds/idl/grammar/Operation.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,7 @@ public void add(com.eprosima.idl.parser.tree.Param param)
8484
}
8585
else
8686
{
87-
// Take note that there is at least one input feed
88-
m_context.inputFeedAdded(p);
89-
m_hasInputFeeds = true;
87+
throw new ParseException(null, "Support for input feeds is part of Fast DDS Pro");
9088
}
9189
}
9290

thirdparty/dds-types-test

0 commit comments

Comments
 (0)