Skip to content

Commit db96f9a

Browse files
structurizr-dsl: Removes deprecated !ref and !extend keywords.
1 parent 183cbfd commit db96f9a

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
- structurizr-dsl: Adds a reluctant version of `include *` (`include *?`) for system context views that only adds relationships to/from the scoped software system.
99
- structurizr-dsl: Adds a reluctant version of `include *` (`include *?`) for container views that only adds relationships to/from the containers in the scoped software system.
1010
- structurizr-dsl: Adds a reluctant version of `include *` (`include *?`) for component views that only adds relationships to/from the components in the scoped container.
11+
- structurizr-dsl: Removes deprecated `!ref` and `!extend` keywords.
1112

1213
## 3.2.1 (10th December 2024)
1314

structurizr-dsl/src/main/java/com/structurizr/dsl/StructurizrDslParser.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -361,11 +361,9 @@ void parse(List<String> lines, File dslFile, boolean fragment, boolean includeIn
361361
ModelItem modelItem = null;
362362

363363
if (REF_TOKEN.equalsIgnoreCase(firstToken)) {
364-
log.warn(REF_TOKEN + " has been deprecated and will be removed in a future release - please use !element or !relationship instead");
365-
modelItem = new RefParser().parse(getContext(), tokens.withoutContextStartToken());
364+
throw new RuntimeException(REF_TOKEN + " was previously deprecated, and has now been removed - please use " + FIND_ELEMENT_TOKEN + " or " + FIND_RELATIONSHIP_TOKEN + " instead");
366365
} else if (EXTEND_TOKEN.equalsIgnoreCase(firstToken)) {
367-
log.warn(EXTEND_TOKEN + " has been deprecated and will be removed in a future release - please use !element or !relationship instead");
368-
modelItem = new RefParser().parse(getContext(), tokens.withoutContextStartToken());
366+
throw new RuntimeException(EXTEND_TOKEN + " was previously deprecated, and has now been removed - please use " + FIND_ELEMENT_TOKEN + " or " + FIND_RELATIONSHIP_TOKEN + " instead");
369367
} else if (FIND_ELEMENT_TOKEN.equalsIgnoreCase(firstToken)) {
370368
modelItem = new FindElementParser().parse(getContext(), tokens.withoutContextStartToken());
371369
} else if (FIND_RELATIONSHIP_TOKEN.equalsIgnoreCase(firstToken)) {

0 commit comments

Comments
 (0)