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

Support dot-path as full name for Namespace #93

Open
gunnarx opened this issue Aug 21, 2023 · 0 comments
Open

Support dot-path as full name for Namespace #93

gunnarx opened this issue Aug 21, 2023 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@gunnarx
Copy link
Collaborator

gunnarx commented Aug 21, 2023

It is possible (according to plan but not implemented) to specify the name of a namespace using a dot-separated path with the same meaning as nesting nodes in YAML.

Example:

namespaces:
- name: A
  namespaces:
    - name: B
      namespaces:
      - name: C
        methods: ...
        properties: ...

can be written equivalently like this:

namespaces:
- name: A.B.C
  methods: ...
  properties: ...

(and also this is equivalent):

namespaces:
- name: A
  namespaces:
  - name: B.C
    methods: ...
    properties: ...

This is not yet implemented.

The tasks of this ticket are:

  • Update the documentation (if necessary) to reflect this correctly
  • Ensure the feature is implemented in each generation tool
  • Include appropriate unit tests that show the implementation working
  • The unit tests shall be implemented as follows:
    Introduce a new reusable test setup. The new test type shall search in a test directory for multiple test inputs and run each of them. This is similar to how the current test is set up. The new test categori shall however specify two IFEX core IDL trees as input (compared to the current tests that have one input and one expected output).
    The new test type shall compare and ensure that the output is equivalent for the two trees (otherwise display the difference). It must run multiple types of generations and use every generation tool, to check each pair of inputs, with each of the tools.

Comment:
We ought to already test correct Namespace output for one of the cases in other unit tests, and therefore this equivalence-comparison is enough to prove the feature. The infrastructure for the new test type can however be reused to compare other possible equivalent ways of writing.

@gunnarx gunnarx added enhancement New feature or request good first issue Good for newcomers labels Aug 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant