HackMD
  • API
    API  HackMD API beta testing
    HackMD API is now in beta, join us for a test drive.
    Getting started Got it
    • API  HackMD API beta testing
      API  HackMD API beta testing
      HackMD API is now in beta, join us for a test drive.
      Getting started Got it
      • Options
      • Versions and GitHub Sync
      • Transfer ownership
      • Delete this note
      • Template
      • Insert from template
      • Export
      • Dropbox
      • Google Drive
      • Gist
      • Import
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
      • Download
      • Markdown
      • HTML
      • Raw HTML
      • ODF (Beta)
      • Sharing Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Note Permission
      • Read
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Write
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • More (Comment, Invitee)
      • Publishing
        Everyone on the web can find and read all notes of this public team.
        After the note is published, everyone on the web can find and read this note.
        See all published notes on profile page.
      • Commenting Enable
        Disabled Forbidden Owners Signed-in users Everyone
      • Permission
        • Forbidden
        • Owners
        • Signed-in users
        • Everyone
      • Invitee
      • No invitee
    Menu Sharing Help
    Menu
    Options
    Versions and GitHub Sync Transfer ownership Delete this note
    Export
    Dropbox Google Drive Gist
    Import
    Dropbox Google Drive Gist Clipboard
    Download
    Markdown HTML Raw HTML ODF (Beta)
    Back
    Sharing
    Sharing Link copied
    /edit
    View mode
    • Edit mode
    • View mode
    • Book mode
    • Slide mode
    Edit mode View mode Book mode Slide mode
    Note Permission
    Read
    Owners
    • Owners
    • Signed-in users
    • Everyone
    Owners Signed-in users Everyone
    Write
    Owners
    • Owners
    • Signed-in users
    • Everyone
    Owners Signed-in users Everyone
    More (Comment, Invitee)
    Publishing
    Everyone on the web can find and read all notes of this public team.
    After the note is published, everyone on the web can find and read this note.
    See all published notes on profile page.
    More (Comment, Invitee)
    Commenting Enable
    Disabled Forbidden Owners Signed-in users Everyone
    Permission
    Owners
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Invitee
    No invitee
       owned this note    owned this note      
    Published Linked with GitHub
    Like BookmarkBookmarked
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    # PEH Meeting Agenda - 2020-09-28 ###### tags: `Error Handling` `Minutes` ## Agenda Items - Prototyping an implementation of `std::core::Error` and stabilizing `#[feature(backtrace)]` - Identifying existing issues and RFCs that we should track - https://github.com/rust-lang/rfcs/pull/2895 - Planning for "Communicating best practices" - "How users expect error handling to be, As in, we take a leap into the future and assume all this was implemented into the language, then how it would potentially look" # Meeting Minutes ## Participants People in attendance: - Jane Lusby - Sean Chen - Ashley Mannix - DPC - Mukund Lakshman - Jakub Duchniewicz - must-compute - Lance Zhang - Oliver - Charles Ellis O'Riley Jr. - Kyle Strand - Lokathor - Jubilee Young ## Topic 1: Discussing stabilizing `Backtrace` - Global hooks vs Boxing vs a trait-based approach for stabilizing `Backtrace` in `core`. - Going with the trait-based impl for `Backtrace` in core. - Private trait + public newtype wrapper. - Start with `eddyb`'s impl and see how many hooks are necessary along the way. - private trait with a public newtype wrapper - newtype wrapper is an interface not subject to coherence so we can add new methods without worrying about breaking changes downstream - https://doc.rust-lang.org/stable/src/std/io/error.rs.html#67-71 - trait-based approaches have fewer magic compiler pieces and so would be easier to put together - `write_backtrace_to(&mut dyn FormatterThing) -> Result<(),FormatterThing::Error>` - ultimately about moving `Error` to core - should we do a trait object based solution internally with an unstable `Backtrace` trait in core and a stable `Backtrace` type in core or should it use global hooks like `panic_impl` - **need a prototype solution for exposing `Backtrace` as a type in `core` with the interface it currently provides in `std`** ## Topic 2: What RFCs should this group be tracking? - This group will have its own Project board to track relevant issues/RFCs. - Prep status reports on relevant issues we're tracking for future meetings. - Pulled from the [tracking board](https://github.com/rust-lang/libs-team/projects/2#column-10224181) - [#58520 tracking issue for error source iterators](https://github.com/rust-lang/rust/issues/58520) - [#53487 tracking issue for RFC 2504, "fix the error trait"](https://github.com/rust-lang/rust/issues/53487) - [#44838 tracking issue for RFC 2011: nicer assert messages](https://github.com/rust-lang/rust/issues/44838) - [#2895 RFC: generic member access for dyn error trait objects](https://github.com/rust-lang/rfcs/pull/2895) - [#66745 tracking issue for PanicInfo::message](https://github.com/rust-lang/rust/issues/66745) - [#2945 `"C-unwind"` ABI](https://github.com/rust-lang/rfcs/blob/master/text/2945-c-unwind-abi.md) - [#2820 `Box` error alias](https://github.com/rust-lang/rfcs/pull/2820) - [#2677 RFC add the close trait](https://github.com/rust-lang/rfcs/pull/2677) - [#2593 enum variant types](https://github.com/rust-lang/rfcs/pull/2593#issuecomment-706514374) - [#NA must not await lint](https://github.com/rust-lang/wg-async-foundations/blob/6b423e0ca89b707534d942ac7d667a9d5f9af2f8/rfc-drafts/must_not_await_lint.md) ## Topic 3: Planning for "Communicating Best Practices" - Facilitate communication of best practices via a Book/documentation. - Should include some guidance on FFI error handling. - Adding a book section to the project repo (using mdbook). - Publish *The Rust Error Book* (name subject to change) and potentially contribute to *The Book* to make its error handling recommendations consistent with what this group decides. ## Topic 4: What is the long-term vision of what error handling in Rust looks like? - `Error` in `core`. - Stabilization of unstable `Error` interfaces. - Iterator API on `Backtrace`. - Generic member access (possibly with two-way flow). - Error return traces. - Some way to universally hook into all error reporting points for consistent error reporting. - Better handling of error enums - Guidance on FFI error handling. - Ways of recovering from recoverable errors. - enum-convergance as errors propagate up the stack

    Import from clipboard

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lost their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template is not available.


    Upgrade

    All
    • All
    • Team
    No template found.

    Create custom template


    Upgrade

    Delete template

    Do you really want to delete this template?

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in via Google

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Tutorials

    Book Mode Tutorial

    Slide Mode Tutorial

    YAML Metadata

    Contacts

    Facebook

    Twitter

    Feedback

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions

    Versions and GitHub Sync

    Sign in to link this note to GitHub Learn more
    This note is not linked with GitHub Learn more
     
    Add badge Pull Push GitHub Link Settings
    Upgrade now

    Version named by    

    More Less
    • Edit
    • Delete

    Note content is identical to the latest version.
    Compare with
      Choose a version
      No search result
      Version not found

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub

        Please sign in to GitHub and install the HackMD app on your GitHub repo. Learn more

         Sign in to GitHub

        HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Available push count

        Upgrade

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Upgrade

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully