Skip to content
This repository has been archived by the owner on Jan 27, 2025. It is now read-only.

Use the default option as in catmandu #333 #356

Merged
merged 8 commits into from
Oct 14, 2024
Merged

Conversation

TobiasNx
Copy link
Collaborator

@TobiasNx TobiasNx commented Jun 6, 2024

Resolves #333.

@TobiasNx TobiasNx force-pushed the 333-defaultOptionWIP branch from 6b01722 to 18b78f0 Compare June 6, 2024 09:34
@TobiasNx TobiasNx force-pushed the 333-defaultOptionWIP branch from 1e4938e to a505fc5 Compare September 18, 2024 18:42
@TobiasNx TobiasNx assigned blackwinter and unassigned TobiasNx Sep 18, 2024
@TobiasNx
Copy link
Collaborator Author

@blackwinter could you help me how I would continue here? I would suggest to drop the _default version of metamorph.

According to last discussion:

* `default` from options.
* `__default` from map.
@blackwinter
Copy link
Member

blackwinter commented Sep 24, 2024

I've changed the default handling according to our last discussion:

  • default from options.
  • __default from map.

(27634d1)

Still needs tests and documentation.

@blackwinter blackwinter assigned TobiasNx and unassigned blackwinter Sep 24, 2024
@TobiasNx
Copy link
Collaborator Author

@blackwinter I added tests and tried them locally but they still seem to fail:

MetafixLookupTest > shouldUseDefaultOptionValueIfNotFound() STANDARD_ERROR
    [Test worker] WARN org.metafacture.metafix.validation.XtextValidator - The FixStandaloneSetup file '/tmp/metafix1977380759175164437.fix' has 1 issue:
    [Test worker] WARN org.metafacture.metafix.validation.XtextValidator - - ERROR: no viable alternative at input 'default' (2:28)

MetafixLookupTest > shouldUseDefaultOptionValueIfNotFound() FAILED
    org.metafacture.metafix.FixParseException: Invalid FixStandaloneSetup resource: /tmp/metafix1977380759175164437.fix
        at app//org.metafacture.metafix.validation.XtextValidator.getValidatedResource(XtextValidator.java:73)
        at app//org.metafacture.metafix.FixStandaloneSetup.parseFix(FixStandaloneSetup.java:31)
        at app//org.metafacture.metafix.FixStandaloneSetup.parseFix(FixStandaloneSetup.java:36)
        at app//org.metafacture.metafix.Metafix.getRecordTransformer(Metafix.java:205)
        at app//org.metafacture.metafix.Metafix.<init>(Metafix.java:119)
        at app//org.metafacture.metafix.MetafixTestHelpers.fix(MetafixTestHelpers.java:151)
        at app//org.metafacture.metafix.MetafixTestHelpers.assertFix(MetafixTestHelpers.java:133)
        at app//org.metafacture.metafix.MetafixTestHelpers.assertFix(MetafixTestHelpers.java:112)
        at app//org.metafacture.metafix.MetafixLookupTest.shouldUseDefaultOptionValueIfNotFound(MetafixLookupTest.java:643)

@TobiasNx TobiasNx assigned blackwinter and unassigned TobiasNx Sep 25, 2024
@blackwinter
Copy link
Member

Could it be that default is a reserved keyword and needs to be quoted (like var)?

@blackwinter blackwinter assigned TobiasNx and unassigned blackwinter Sep 25, 2024
@TobiasNx TobiasNx changed the title WIP to use the default option as in catmandu #333 Use the default option as in catmandu #333 Oct 14, 2024
@TobiasNx TobiasNx marked this pull request as ready for review October 14, 2024 13:15
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@TobiasNx TobiasNx requested a review from fsteeg October 14, 2024 13:35
@TobiasNx
Copy link
Collaborator Author

I adde @fsteeg for code review

@TobiasNx TobiasNx assigned fsteeg and unassigned TobiasNx Oct 14, 2024
@fsteeg fsteeg assigned TobiasNx and unassigned fsteeg Oct 14, 2024
@TobiasNx TobiasNx merged commit cdce76f into master Oct 14, 2024
1 check passed
@TobiasNx TobiasNx deleted the 333-defaultOptionWIP branch October 14, 2024 14:52
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Lookup option default does not work
3 participants