Rust Spec Team
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Write
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Help
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
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
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    --- title: T-spec meeting 2024-03-21 tags: ["T-spec", "meeting", "minutes"] date: 2024-03-21 discussion: https://rust-lang.zulipchat.com/#narrow/stream/399173-t-spec/topic/Meeting.202024-03-21 url: https://hackmd.io/jR6-og7YQ9WFIz1wpaDqhw --- Attendees: Joel Marcey, Mara Bos, TC, Lukas Wirth, Eric Huss, Connor Horman, Pietro, Urgau, pnfelix, Mario Carneiro, Monadic Cat Potential Agenda: * Test Suite and Code Samples * Any other business ## Test Suite and Code Samples https://github.com/rust-lang/spec/issues/49 Joel: (summarized the issue created by Eric) Eric: Is this interesting to the specification effort? If so, we can talk about how this works? (e.g., Ferrocene - links to the rustc test suite). Prefer to have test suites more local - inline. pnfelix: Concerned that creating a test suite would be a lot of effort. Would prefer to use tests from rustc or add to rustc. Strongly advise against having a separate test suite. And strongly advise against not having the project manage it. Possible downside is that if the project manages it, they may modify things that we do not want. Pietro: It was less effort to link to the rustc test suite for the Ferrocene specification. What do we want from this test suite upstream? Agree with pnfelix that we don't create our own suite. Joel: How amenable is the compiler team to adding new tests? pnfelix: Generally amenable. Considerations for tests that may be expensive to rust. Downside is that time it takes to get new tests PRs merge by the compiler team. Connor: Very interested in the spec having a test suite. It is not a high priority that we have a comprehensive test suite that is specific to the specification. Consider having our own test suite in the future. Joel: Believes momentum of this decision and priority of other items will make it difficult to reverse course. TC: Personally, I'm sympathetic to the concerns about building a new test suite. But I want to be sure that Eric is heard on this. He raises a number of considerations we may want to discuss here. E.g., it sounds like Eric is proposing something similar to doc tests. He's suggesting that these be tightly integrated and shown in the rendering of the spec itself. He points out that these tests, in his experience, have to be written when writing the spec anyway for two reasons: 1) for the writer, to verify understanding, and 2) for exposition to the reader. He highlights that not putting these tests in the spec itself puts the spec in an awkward position of having to chase down changes to these tests. Eric: In Mara's sample chapter, there was sample code inline. And it is important that we have that in the specification. Personal experience is that it is difficult to find exisitng tests that are testing what is being written (say for the reference). Pietro: Limitation of linking to the tests in rustc. Only usable with the rustc that that the tests came with. Diagnostics can change between versions.B elieves that separating out the existing test suite into its own spec test suite will not be so hard because we will already have the tests. For spec items that were not covered, kept a log file. pnfelix: Allocate a spec subspace in the rustc test suite. Still part of the CI for the compiler. Can simplify that we have only care about error code and not diagnostics. Joel: Duplication of tests with a subspace? pnkfelix: Shouldn't be an issue. Connor: Integrated tests directly in the spec. We are going to lead a lot more capability to do that effectively. Layout tests, for example. TC: I'm curious to what degree we may perhaps be responding to the specific words "test suite". If Eric had instead proposed certain "doc tests" within the spec, would we still have these concerns and want to push all of these doc tests into `rustc`? Are there any doc tests that we want within the spec itself? Pietro: Amount of work is the same whether tests are inline or separate. Joel: Being using the existing test suite, but be congnizant at some point that we may need to go down our own route. TC: The premise of Eric's proposal seems to be that we need to write many tests anyway, 1) for our own understanding, and 2) as necessary expositional material. Everything else in his proposal seems to fall out from that. I'm curious whether we disagree with the premise or with the proposed consequences of it? Connor: Agree with the premise. pnfelix: Don't disagree with the premise. The main problem with linking is that there is not easy ways to show certain benefits of the tests within the specification. Eric: Don't agree that it would be that much work. But if others feel that way, we could try linking. Trying to test with rustdoc is not very satisfying. Connor: Problem with inline tests would be tooling pnfelix: Does Eric believe that the current rustc test suite does not have the right level of validation? Eric: Issues with tests as written. With current tooling to test Mara's code samples, all we have is rustdoc. In the reference, a lot of tests are ignored or not validating what they are showing. Pietro: We are not on the same page of what this test suite is for. The question is less make sure that the samples in the spec are valid. Is the goal every part of the specification is testable. Eric: Won't have 100% coverage. But we will have illustrative examples. And a second kind of test - making sure we are covering what we say in English are actually true with tests. These would be linked. Mario: Development differences between using the tests in rustc vs. having them in the spec. Scheduling differences for example. rustc = nightly. spec = specifying older versions. How are we going to handle if we are running UI tests in the repo? Eric: Spec will follow the same process as the reference. Following the current master branch on what rust is. Mario: Does that mean a previous version won't be specified? Eric: Every rust spec will have a version. But we will start at a specific version. Joel: Don't we want the specification to be the source of truth for rustc and thus its test suite should be the source of truth? Pietro: Yes, but you can still share test suites. pnfelix: Coverage and exhaustiveness should be in the main test suite. Illustrative examples would be hard to live in the rustc test suite. Having a separate test suite for that case makes some amount of sense. Worried about divergence. Mario: Normative tests is a good point. Linking to tests could be problematic because how would folks know what the "golden test". Pietro: Links are defined in the tests themselves. Eric: We should move forward to linking to the rustc test suite in some way. But a little uncertain on how we handle illustrative examples. Pietro: illustrative examples live in the spec repo. --- ## Chat Content https://hackmd.io/jR6-og7YQ9WFIz1wpaDqhw 8:01 avatar Connor Horman Connor Horman says:(FTR: I am working on a blog post that is pointing out that we should take an approach to Alternative Implementations that doesn't exclude us from supporting them in the future) 8:22 MC Monadic Cat Monadic Cat says:As a bystander, I think it makes sense to get spec tests their own space in the rustc test suite, as the shortest path to having rustc ensure it passes all of them on every release. But I also think there's room for just having a tool for running every sample Rust snippet presented in the spec, to make sure spec writers don't woopsie. 8:30 avatar Connor Horman Connor Horman says:One place I'd like to use internal tests is the layout chapter, to validate the places I use a struct layout for a type. 8:30 MC Monadic Cat Monadic Cat says:In my opinion, writing a tool that extracts every Rust snippet from a collection of markdown files shouldn't be that hard... having used pulldown_cmark exactly once, lol 8:34 avatar Connor Horman Connor Horman says:Having used it twice, it would not at all be hard. The fancier tooling for more interesting tests would be harder. Connor Horman says:(Running a comprehensive test suite might be a custom mdbook backend) pnkfelix pnkfelix says:Validation of Illustrative examples, versus Coverage of every concept 8:38 U Urgau Urgau says:Couldn't the spec tests be subtree of the rustc test suite ? That way it would integrate seemlesly. pnkfelix pnkfelix says:Urgau: That is what I have been trying to suggest. I guess I have not been clear. being able to run a test suite against multiple distinct versions of rustc is perhaps the best argument I see for making a test suite that is decoupled from the rustc test suite. pnkfelix says:(but I think that can be accomplished via swapping a subtree within the rustc ui test) Connor Horman Connor Horman says:> being able to run a test suite against multiple distinct versions of rustc is perhaps the best argument I see for making a test suite that is decoupled from the rustc test suite. Or against !rustc. This is why I want it in the future, but not necessarily as high priority now. On the side of desyncing spec->rustc vs. rustc->spec, rustc could submodule the spec repo or a separate spec-test repo. 8:55 P pnkfelix pnkfelix says:We have a toml files that can assign ownership of the subtree to ensure that a member of T-spec has to sign off on changes to files that live underneath the subtree pnkfelix says:(or at least are notified about them)

    Import from clipboard

    Paste your markdown or webpage here...

    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 lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    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 with Wallet
    Wallet ( )
    Connect another wallet

    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

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    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 and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    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.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        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
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

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

        Syncing

        Push failed

        Push successfully