8000 Bugfix/rrel lookup multifile problem, issue #377 by goto40 · Pull Request #379 · textX/textX · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Bugfix/rrel lookup multifile problem, issue #377 #379

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

Merged
merged 16 commits into from
Apr 1, 2022

Conversation

goto40
Copy link
Member
@goto40 goto40 commented Mar 27, 2022

Code review checklist

  • Pull request represents a single change (i.e. not fixing disparate/unrelated things in a single PR)
  • Title summarizes what is changing
  • [X/squash] Commit messages are meaningful (see this for details) -- I will squash...
  • Tests have been included and/or updated
  • [n/a] Docstrings have been included and/or updated, as appropriate
  • [n/a] Standalone docs have been updated accordingly
  • Changelog(s) has/have been updated, as needed (see CHANGELOG.md, no need
    to update for typo fixes and such).

@goto40 goto40 requested a review from igordejanovic March 27, 2022 18:56
@goto40
Copy link
Member Author
goto40 commented Mar 27, 2022

Maybe we can configure "coveralls" not to complain if we have only small changes in the test coverage?
I did not exactly found where to change this (PHPCompatibility/PHPCompatibility#590)...

@igordejanovic
Copy link
Member

Good work! Looks good on a first look. I'll do the full review in the following days.

Maybe we can configure "coveralls" not to complain if we have only small changes in the test coverage?

Good point, it is annoying to fail for negligible decrease. I increased failure threshold to 0.1%. We'll see if we need it higher.

Copy link
Member
@igordejanovic igordejanovic left a comment

Choose a reason for hiding this comment

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

Great work! I left just a few minor fixes/questions.

CHANGELOG.md Outdated
@@ -31,6 +31,8 @@ please take a look at related PRs and issues and see if the change affects you.

### Fixed

- Fixed RREL lookup in case of multi-meta models (some special cases were not
handled correctly; [#379]).
Copy link
Member

Choose a reason for hiding this comment

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

This should go to the # Unreleased section.

Copy link
Member Author

Choose a reason for hiding this comment

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

done

CHANGELOG.md Outdated
@@ -555,6 +557,7 @@ please take a look at related PRs and issues and see if the change affects you.
- Metamodel and model construction.
- Export to dot.

[#379]: https://github.com/textX/textX/pull/379
Copy link
Member

Choose a reason for hiding this comment

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

This also.

Copy link
Member Author

Choose a reason for hiding this comment

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

done

for m in obj._tx_model_repository.local_models:
start.append(m)
if obj._tx_metamodel.builtin_models:
print("builtin!")
Copy link
Member

Choose a reason for hiding this comment

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

This print should be removed or commented out.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah.. I missed this one. Removed,

A r2 {}
}

// activate importURI (in any case, also for `GrammarMissingPlusM.tx`):
Copy link
Member

Choose a reason for hiding this comment

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

Why this comment here?

Copy link
Member Author

Choose a reason for hiding this comment

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

I added an explanation. Look if it can be understood... We may to add more verbose explanation and a hint that "+m" will be deprecated...

// activate importURI (in any case, also for `GrammarMissingPlusM.tx`):

R R.r2

Copy link
Member Author

Choose a reason for hiding this comment

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

Hmm. We can also remove the whole comment... Without the "R" command, we could also pass the test w/o implementing the RREL provider correctly...

Copy link
Member

Choose a reason for hiding this comment

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

Ah, ok. I think I've figured out what are you up to. I did a slight refactoring and comment rewording. I've moved R command before A and P1. Then in R I used a non local reference to show that the R command can find its referent in both cases since the +m for R rule is not removed. Then we can clearly see that P1 can't be resolved when +m is removed. Does that looks ok?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes. Very good. Thank you for the clarification. After all it is a border case.

6D47 Copy link
Member

Choose a reason for hiding this comment

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

If that is OK I think this is ready to be squash merged.

@goto40 goto40 merged commit 1fd0b39 into master Apr 1, 2022
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.

2 participants
0