intersystems / intersystems/pyprod

Multi-line defaults in IRIS Properties cause ObjectScript compilation errors

Open
#6 0 comments 0 reactions 1 assignee Claimed by @isc-gkalra View on GitHub
Dominant language
Python
Stars
10
Forks
7
PR merge metrics
No merged PRs in 30d

Description

Having multi-line default values for IRIS Properties causes objectscript syntax errors:

For example:
```
iris_property_one = IRISProperty(default = """this is a multiline default property
to demonstrate an error
""", description="property desc")
```

Doesn't get registered due to:

```
ERROR #5559: The class definition for class 'QuickStart.CustomBS' could not be parsed correctly, possibly due to non-matching {} or () characters or a missing ; character or non-matched /* */ blocks. Edit the class and correct the problem.
> ERROR #5030: An error occurred while compiling class 'QuickStart.CustomBS'
```

The reason is the incorrect ObjectScript Syntax:
```
Property PropSetting0 As %VarString [InitialExpression = "this is a multiline default property
to demonstrate an error
"];
```

While this is a fairly niche issue, it was difficult to debug because the python code had valid syntax.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.