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

Chore/update to latest rascal #8

Merged
merged 8 commits into from
Aug 29, 2024
Merged

Conversation

DavyLandman
Copy link
Member

@jurgenvinju / @PaulKlint rascal-core is complaining about functions that start with an underscore, is there a reason for this?

Since <errorsAsWarnings> is true we can skip fixing it, but can we maybe explain in the error message why it's an error?

@jurgenvinju
Copy link
Member

This is a new rascal feature only implemented by the static checker and not by the interpreter: Names starting with an underscore can not be used, and are not complained about when they are not used. It's a new effective way to document the parameter position that you match with _ to ignore it.

@jurgenvinju
Copy link
Member

Let's set errorsAsWarnings to false to see how for we can get in solving the issues here. We're getting very close. Lots of improvement since 0.7.8 of rascal-core

Let's see how many errors we can solve.
@DavyLandman
Copy link
Member Author

This is a new rascal feature only implemented by the static checker and not by the interpreter: Names starting with an underscore can not be used, and are not complained about when they are not used. It's a new effective way to document the parameter position that you match with _ to ignore it.

For the parameters this makes sense (due to overloading etc).

But in this case it's both an error to name a function _x and then an error to invoke that function _x. There is something to be said for the second error, but the first one seems to restrictive.

@@ -288,7 +286,7 @@ Attr onSubmit(Msg msg) = event("submit", succeed(msg));
Attr onBlur(Msg msg) = event("blur", succeed(msg));
Attr onFocus(Msg msg) = event("focus", succeed(msg));

Attr onCheck(Msg(bool) f) = event("change", targetChecked(f));
Attr onCheck(Msg(bool) f) = event("check", targetChecked(f));
Copy link
Member Author

Choose a reason for hiding this comment

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

@tvdstorm I've fixed a c&p error (the onCheck function was defined twice), I hope I generated the right events.

@DavyLandman
Copy link
Member Author

@tvdstorm / @jurgenvinju this one is ready for merging I think.

@DavyLandman
Copy link
Member Author

ok, offline I got approval by @jurgenvinju

@DavyLandman DavyLandman merged commit 7c39cd2 into main Aug 29, 2024
1 check passed
@DavyLandman DavyLandman deleted the chore/update-to-latest-rascal branch August 29, 2024 12:48
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.

3 participants