Skip to content

System.Console work planned for .NET 7 #64487

Closed

Description

@jeffhandley

This issue captures the planned work for .NET 7. This list is expected to change throughout the release cycle according to ongoing planning and discussions, with possible additions and subtractions to the scope.

Summary

During .NET 7, we will address some common pain points enable new functionality that improves the cross-platform experiences for .NET Console applications. We will contribute to the reconsideration of the new console template that was introduced in .NET 6. The discussion about a potential Console redesign will continue.

Planned for .NET 7

Backlog (roughly in priority order)

Notable Discussions

Activity

  1. added
    Epic
    Priority:2
    on Jan 29, 2022
  2. added this to the 7.0.0 milestone on Jan 29, 2022
  3. ghost added
    untriaged
    on Jan 29, 2022
  4. removed
    untriaged
    on Jan 29, 2022
  5. davidfowl commented on Jan 29, 2022

    @davidfowl
    Member

    What about async console APIs on (workable on linux) cc @stephentoub ?

  6. jeffhandley commented on Mar 5, 2022

    @jeffhandley
    MemberAuthor

    This list in this issue has been edited to reflect changes from our ongoing planning and discussions. The headings have been updated to reflect what is still planned for .NET 7 and what is in the backlog. The list is still expected to change throughout the release cycle with periodic reviews of our plans.

    @davidfowl / @stephentoub Can you share any more info on the async console APIs topic? Are there specific scenarios that you have in mind?

  7. stephentoub commented on Mar 6, 2022

    @stephentoub
    Member

    Can you share any more info on the async console APIs topic? Are there specific scenarios that you have in mind?

    I don't know exactly what David was referring to in his comment, but broadly there are three areas here:

    1. Make the asynchronous operations on the default Stream underlying Console actually asynchronous. Today they just inherit the base Stream behavior of doing async-over-sync (queuing a work item to invoke the corresponding sync methods). This isn't feasible on Windows today, but we could make it work on Unix, e.g. by leveraging the async infrastructure under Socket and having UnixConsoleStream use Socket to intact with the underlying file descriptor (in the future hopefully that infrastructure would move lower in the stack, but for now this should work, similar to what we do in PipeStream on Unix). If we did that, then the asynchronous operations on Console.Out and Console.In would be truly asynchronous. This is primarily useful when stdin/out/err have been redirected and Console is being used to read/write with a parent process.
    2. Add async equivalents to methods like Console.Write, WriteLine, etc. This would be trivial once (1) was done, but they'd similarly be truly asynchronous on Unix only.
    3. Add async equivalents to other methods like ReadKey, ones that actually interact with the terminal.

    I'd like to see (1) done in .NET 7 if possible. There's no new API required, it's just making something existing work better.

    I don't have strong feelings about (2), but I never love the idea of exposing new async APIs we couldn't actually make async everywhere. We'd also need to figure out the synchronization story around concurrent usage... today all the sync methods coordinate with a big lock around every operation.

    And for (3), it's not something to tackle in 7. I don't even know if it's fully possible.

  8. davidfowl commented on Mar 6, 2022

    @davidfowl
    Member

    I was referring to 1 and 2, I remember we attempted that and then reverted in 6.0.

  9. ghost locked as resolved and limited conversation to collaborators on Sep 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

EpicPriority:2Team:Librariesarea-System.Console

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions