Skip to content

Kill the bad things#817

Merged
cmoesel merged 7 commits intomasterfrom
kill-bad-things
May 26, 2021
Merged

Kill the bad things#817
cmoesel merged 7 commits intomasterfrom
kill-bad-things

Conversation

@cmoesel
Copy link
Member

@cmoesel cmoesel commented May 19, 2021

This PR removes support for formerly deprecated syntax features, including:

  • Mixins: keyword
  • units keyword
  • , path separator in flag rules (replaced by and)
  • , concept separator in value set rules (replaced by and)
  • | type separator in references (replaced by or)

These have all been removed from the formal grammar (to keep it nice and tidy). When ANTLR produces syntax errors, SUSHI analyzes them to produce a friendly error message.

Tests have been updated accordingly, but you can also test this manually with the following FSH:

Profile: MyPatient
Parent: Patient
// Mixins == bad
Mixins: MyRS
* name 1..* MS

RuleSet: MyRS
* active MS

Profile: MyObservation
Parent: Observation
// units == bad
* valueQuantity units = http://foo.org#bar

Alias: MyVS = http://boo.org/far

Profile: MyObservation2
Parent: Observation
// units == bad
* valueQuantity units from MyVS (preferred)

Profile: MyCondition
Parent: Condition
// , == bad
* onset[x], abatement[x] MS

Alias: Zoo = http://zoo.org
ValueSet: MyValueSet
// , == bad
* #hippo, #crocodile , #emu from system Zoo

ValueSet: MyValueSet2
// , == bad
* codes from valueset FirstZooVS, SecondZooVS

ValueSet: FirstZooVS
* Zoo#foo

ValueSet: SecondZooVS
* Zoo#bar

Extension: MyExtension
// | == bad
* value[x] only Reference(Patient | Practitioner | Person)

@cmoesel
Copy link
Member Author

cmoesel commented May 19, 2021

Also... hurray for deleting code!

Copy link
Collaborator

@jafeltra jafeltra left a comment

Choose a reason for hiding this comment

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

Looks great! I got the expected errors and the tests look updated to me!

I haven't run the regression script on this yet, but I can if we'd like before officially merging.

@cmoesel
Copy link
Member Author

cmoesel commented May 26, 2021

I ran the regression:all script and there were (surprisingly) no regressions. I guess our warnings about deprecated syntax worked! So... I am going to merge.

@cmoesel cmoesel merged commit 92c85ad into master May 26, 2021
@cmoesel cmoesel deleted the kill-bad-things branch May 26, 2021 15:55
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.

3 participants