Skip to content

New recommendation for except:#27

Open
arnetheduck wants to merge 1 commit intomainfrom
except-all
Open

New recommendation for except:#27
arnetheduck wants to merge 1 commit intomainfrom
except-all

Conversation

@arnetheduck
Copy link
Member

Following the acceptance of nim-lang/RFCs#557, except: now has mostly well-defined behavior.

Also add gcsafe to push recommendation which improves error messages overall.

Following the acceptance of nim-lang/RFCs#557,
`except:` now has mostly well-defined behavior.

Also add `gcsafe` to `push` recommendation which improves error messages
overall.
Copy link
Contributor

@Ivansete-status Ivansete-status left a comment

Choose a reason for hiding this comment

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

LGTM! 🙌
Just two minor questions

@@ -1,4 +1,4 @@
{.push raises: [].}
{.push raises: [], gcsafe.}
Copy link
Contributor

Choose a reason for hiding this comment

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

Why gcsafe needed?

Copy link
Member Author

Choose a reason for hiding this comment

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

gcsafe is already needed for all async functions (enforced by chronos) - putting it in push improves the error message to show the source of the violation.

# Enable exception tracking for all functions in this module
`{.push raises: [].}` # Always at start of module
# Enable exception and gcsafe tracking for all functions in this module
`{.push raises: [], gcsafe.}` # Always at start of module
Copy link
Contributor

Choose a reason for hiding this comment

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

Is the recommendation to add this at the beginning of each module? I wonder if there could be a global config that does it by default

Copy link
Member Author

Choose a reason for hiding this comment

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

not that I know of

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