Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option set: Optional options attributes cause runtime errors #8796

Closed
thomasheartman opened this issue May 4, 2021 · 1 comment
Closed
Assignees
Labels
Projects
Milestone

Comments

@thomasheartman
Copy link

As discussed on the internal slack, the minimum and maximum attributes of an option set's options element are optional (according to the schema), but XP throws a runtime exception if you try and use an option set without these specified. The error mentions a ConvertException from string to int, which can be hard to debug if you don't have any numbers in your XML.

Because the attributes are optional according to the schema, a language server or other similar service might not (mine doesn't) tell you that you need to add the attributes.

This option set demonstrates the issue.

<option-set name="set">
  <label>Os</label>
  <options>
    <option name="a">
      <label>A</label>
    </option>
  </options>
</option-set>
@rymsha rymsha added this to Needs triage in Bugs via automation May 4, 2021
@rymsha rymsha moved this from Needs triage to Low priority in Bugs May 4, 2021
@rymsha
Copy link
Contributor

rymsha commented May 4, 2021

schema should be updated to make minimum and maximum attributes required

@rymsha rymsha moved this from Low priority to Closed in Bugs May 12, 2021
@rymsha rymsha moved this from Closed to Low priority in Bugs May 12, 2021
@rymsha rymsha modified the milestones: 7.8.0, 7.7.0 May 14, 2021
@rymsha rymsha moved this from Low priority to Closed in Bugs May 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Bugs
Closed
Development

No branches or pull requests

4 participants