Replies: 47 comments 62 replies
-
The v2 branch has been created. We'll be using the git-flow model to bring v1.x work into v2 on a periodic basis as progress is made. |
Beta Was this translation helpful? Give feedback.
-
Tenets for v2 (Unless you know better ones)
Please feel free to suggest other tenets or modifications to those above. I'll keep this post updated with the latest input. |
Beta Was this translation helpful? Give feedback.
-
Themes for v2
These are my (tig's) interpretation of what people want to see in v2. I'm putting these here to cause debate and discussion. So please share your thoughts! I'll keep this post updated as the discussion progresses... |
Beta Was this translation helpful? Give feedback.
-
Team (esp @BDisp, @tznind , and @migueldeicaza ): I have a thought. It may not be well formed, but i'd like to express it and get your input: We have several new, compelling, features currently targetting pre-v2:
In building ComfiguraitonManager, several times I wanted to leverage new C# and dotnet features (e.g. NRT, c# v9 features, etc...). But I couldn't because they would cause breaking changes to the existing API. @BDisp really wants to add NRT support for CheckBox, but that will be a breaking API change. My idea is this:
Why? Because one of the challenges with moving to a v2 with breaking API cahnges is getting people to adopt it and "move on". By ensuring v2.x has new, exciting functionality that is not in v1.x, we can encourage app developers to move to v2.x. The argument against, this idea, of course, is these new features (except maybe TrueColor) really need breaking API changes, so why not put them in v1.x and then move them to v2? My counter to this is: we have limited resources and energy. What do you all think? |
Beta Was this translation helpful? Give feedback.
-
RE: Breaking changes - see how just a simple nullable change like @BDisp did with #2313 requires changes pretty much everywhere. I am skeptical we can do v2 and support nullable deeply without requiring almost all code that uses Terminal.Gui to be impacted. Am I wrong? |
Beta Was this translation helpful? Give feedback.
-
In terms of maintaining the v1 library, I think there are several choices:
I wonder if 3) is realistic. It certainly is interesting. I wonder if just a new |
Beta Was this translation helpful? Give feedback.
-
Here is a practical proposal for moving forward with v1 (that may feel painful). See this for context: tig#10 (comment)
|
Beta Was this translation helpful? Give feedback.
-
@tig I agree with all you said but not about revert to 1.9 tag. I thing it's more accurate you publish the current develop branch as is and merge to main, maybe 1.91 tag. Create the new v1_develop branch based on the 1.91 to target the v1.10 and all the pendents PR to the develop will be closed to being creating new PR's to submit to the v1_develop. After all this then the v2_develop must always be merged with the v1_develop, if compatible, until the v2 is declared as finished. |
Beta Was this translation helpful? Give feedback.
-
I'd like to try using Github's Project capabilities to manage what and when we work on for v2. See here: https://github.com/orgs/gui-cs/projects/1/views/1 Take a look and let me know what you think of what's in there so far. |
Beta Was this translation helpful? Give feedback.
-
I wonder what .Net version will be the main target of v2. Sorry if I missed it. I personally feel like it's time to say goodbye to NetFW. Especially when modern .Net has so much stuff, both quality of life and performance. If v2 is going to have solid breaking changes that will hake transition hard then it might be a good thing to move on with .Net too and target current lts (.Net 6) On the other hand if majority of users are .NetFW users then there is nothing to be done I guess. As a side note for nrt - technically only annotating reference types to be Nullable or not Nullable is not a breaking change. People can opt in to NRT or just disable it altogether. Making struct Nullable is another thing because it's a binary breaking change: there was some type of T, now it's Nullable of T. So as long as you have compiler recognized attributes you can even target ns2, netfw4.8, etc. Same goes with other compiler features that use attributes as a mean of adding context One thing I can wish for in goals is to simplify creation of custom views/components. To me it feels quite hard especially when comparing to modern html/css where you just splat some attributes and handlers and voila - you have a custom component. I wonder if something can be done here to make this kind of stuff easier. |
Beta Was this translation helpful? Give feedback.
-
Tracking to this discussion these comments because they are interesting #2385 (comment). |
Beta Was this translation helpful? Give feedback.
-
@tig if a border has a thickness of two and the user set the border style to none automatically decrease one thickness for the border frame or the two? Or we need to decrease manually after? I'm asking this because a user may want to have a border without a border frame. Thanks. |
Beta Was this translation helpful? Give feedback.
-
This is how the margin is working in the |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
I have started updating TerminalGuiDesigner to be compatible with 2.0 when it ships. I am using a git submodule to target I thought I would keep a note of the breaking changes that are not already included in #2448
|
Beta Was this translation helpful? Give feedback.
-
Just a general thought I had about interaction with the console, in general, which could habe meaningful impacts on memory and performance for multiple reasons: The screen buffer is only up to short.MaxValue in either dimension, meaning we could use shorts all over the place instead of ints. Where this matters big-time is the fact that a lot of operations can be explicitly vectorized in code or are likely to be implicitly vectorized by the compiler or the JITer. Using int or uint has two important impacts on that:
Of course it also means that memory use can be less, on the heap, and is likely to be less, on the stack, as well. Just something to think about. |
Beta Was this translation helpful? Give feedback.
-
Oh hey @BDisp R# 2024 was release a couple weeks ago and has fixes for at least one of the bugs you mentioned at some point. It also has a fix for the way it was previously breaking formatting on some (but not all) raw string literals. As well as whatever else the new version has of course. A worthwhile update for sure, if you haven't already grabbed it. |
Beta Was this translation helpful? Give feedback.
-
Hey guys. Check this out... https://github.com/microsoft/terminal/tree/main/samples/ConPTY/GUIConsole |
Beta Was this translation helpful? Give feedback.
-
Hey @tig So, our whole PR thing about naming and whatnot, which is kinda unnecessarily cumbersome and verbose... Projects actually enable that kind of linking, but in a stronger, more formal, and easier-to-enforce way, without having to make cumbersome or inaccurate names. Take a look at my project I've used for various Terminal.Gui work. If you click on any of the issues, you'll see some extra data over on the right, under the project. In particular, I added fields for priority, Terminal.Gui Issue# and Terminal.Gui PR#. I also opted to have the TG Issue# displayed on the item cards, for top-level visibility without having to click on one to see it. And the default behavior of items like that is you click it and then it shows you everything else that has that property with that value. Really nice. For me, since it's a fork and the main fork isn't configured to allow it, I can't make a whole lot more than informational usage of them (but that's valuable to me anyway). If we had a project, over here, instead of a milestone, you could add properties like that, too. Those properties are available for use in issues and PRs. Those properties are then available to github actions/workflows, and those actions can get OR set them, for any purpose you can dream up. A few simple examples of where that's useful and a QoL improvement:
Plus of course all the other organizational goodies like boards and timelines and stuff that just come along with projects. Then you can also use the Milestones for what they're really meant for, which is milestones of a given project's development (can also see that in use in my project, where I have a milestone for my source gen work). That enables strong grouping of things by what they relate to, and also gives a little progress bar for each milestone, which just displays percentage of issues in that milestone that are finished/closed vs open. Plus, projects have another nice feature: Draft items. Users with write access to the project can put up cards for issues/ideas/whatever that are just a title and it doesn't actually make an issue until you tell it to convert it to an issue. That really helps de-clutter things when people have ideas or things to do but aren't ready to write up a formal issue. I'd have my project link to this repository, but you can only link a project to a repository you are a member of, with I forget what specific permission. |
Beta Was this translation helpful? Give feedback.
-
We have a project. You just didn't have access to it! https://github.com/orgs/gui-cs/projects/1 I made you admin. I'm MORE than happy for you to take what's there and make it sing. I spent just enough time setting it up to realize I was probably not doing it optimally ;-) |
Beta Was this translation helpful? Give feedback.
-
Ha OK cool. Happy to lend a hand with that. Will have a look this weekend most likely. Been kind of a busy week.
|
Beta Was this translation helpful? Give feedback.
-
.net 8.0 SDK automatic version metadata enhancementIf you are building with the .net 8.0 SDK, regardless of what target framework is specified in the project file, commit information can now be automatically included in the version, if it is defined for the build. It is appended to the InformationalVersion attribute of the assembly, which is what you get when you access Assembly.ProductVersion, and is what users see. What does "specified in the project file" mean? MSBuild has a new property/element you can use:
|
Beta Was this translation helpful? Give feedback.
-
V2 Beta Release Criterion(Draft for feedback and debate.) These are the criteria we will use to decide whether V2 Beta can be released. Once we agree on these criteria, we will use them to classify all existing and future Issues. We will not accept any PR into v2_develop that does not meet these criteria. By taking this approach we can get all contributors focused on a release and get it out as quickly as possible. V2 Beta Goals
Priority definitions for Issues
Beta Exit Criteria
If we focus as a team on meeting these criteria, we can get the Beta out the door quickly and continue to innovate on top of it for years to come! I will be the Release Owner. I will take responsibly for driving the team to release. I will do the structural work required to keep us organized and focused. I have final say on Issue priority and the final call on release readiness. Next steps:
This is all posted in the spirit of driving focused debate. I have 30+ years experience driving releases at scale. I still have a ton to learn, and my experience doing it as an OSS maintainer is limited. I need your help! Let's get 'er done and ship it! |
Beta Was this translation helpful? Give feedback.
-
Oh hey. While I was dealing with a thread-safety issue with some old internal code, it made me think of something that was part of a conversation here where the same issue exists if it hasn't been changed since then. I don't remember specifically which type it was, but there was a type that is written such that it requires properties to be set in a specific order in an initializer or it can throw an exception. Does that ring a bell for anyone? I don't remember where it was... In any case, that's not even safe on single-threaded applications, because Roslyn, RyuJIT, AND your CPU are all allowed to reorder reads and writes to memory and the ECMA spec for the CLR does not restrict that. You cannot ever expect simple assignment or read operations like that to execute in the order you wrote them, except for most of the time in debug builds, and places where there are a bunch of consecutive simple operations like that or a loop with similar results are ripe for that kind of optimization, so the system can save some round trips to memory. To ensure at least partial restriction of that reordering, but still only within a single logical CPU, you can declare fields volatile. But nobody has just one logical CPU, anymore, so that's pointless and just costs performance without actually fixing the problem (the biggest underlying reasons why use of And this is even a problem for values that normally would be atomic, if they are members of a struct that isn't native-word aligned (so 4 bytes on 32-bit and 8 bytes on 64-bit). That's what you get if you make a struct with explicit layout, like might be done for interop with some native libraries. The cause of that is un-aligned reads and writes, so it may be theoretically possible in other situations, but I'm not aware of how to force that elsewhere. This issue is always a heisenbug, unless Roslyn, which is the least likely to do that optimization, is the one to do it, in which case it'll still be a heisenbug, but just happen more frequently. The issue with that old code that I fixed was ultimately because of reordering, and wasn't in a struct. It was just in a plain ol' innocent class. The bug has been an annoying heisenbug for a very long time and the stack traces were never helpful because it pretty much never caused the crash right there or even near there in the program. I finally found it by tracing, line by line, from the first method call in Main(), til I found SOMETHING that was capable of causing bad values, while assuming essentially infinite threads to be extra-cautious. That's when I eventually came to the problem spot. It was the same thing: order-dependent fields being set by property accessors in an initializer. I wrote up a test hardness to run that small part of code a bunch of times, in a bunch of processes, each with a bunch of threads, to try to hit it, now that I had a narrow spot that could actually feasibly be performed on. Sure enough, the bug was triggered after about 20 minutes of that running, by the 45108'th process that was launched. Suspicious of that issue, I went looking for documentation backing it up and, sure enough, there's more than one document mentioning it. So, first I did an explicit process-wide memory barrier there and re-ran the test harness, just to verify it actually did behave as expected. After two hours, it had still not occurred, so I called that a good enough confirmation that that was, indeed, the problem. Because of the cost of that, though, I took that back out and just made them not dependent on specific ordering, so barriers would not be needed. Ran the tests again, and left it running overnight on two VMs with lots of cores assigned to them. Checked in on them in the morning and none had hit the issue. So, whether it was Roslyn, RyuJIT, or the CPU is unknown. But it's also unimportant, because it doesn't matter who reorders things - the problem can still happen. It just also might not. So, the takeaway is just don't do that, because there's always another way. |
Beta Was this translation helpful? Give feedback.
-
It was related to AutoSize. Which is now gone. |
Beta Was this translation helpful? Give feedback.
-
We now have 3 Projects, listed in order of priority: |
Beta Was this translation helpful? Give feedback.
-
Update on branches and buildsThe default Github branch for https://github.com/gui-cs/Termina.Gui is now `v2_develop1 Terminal.Gui v2
Terminal..Gui v1
|
Beta Was this translation helpful? Give feedback.
-
This is magnificent. |
Beta Was this translation helpful? Give feedback.
-
These are the issues remaining that prevent us from declaring v2 Alpha: Go here for details: |
Beta Was this translation helpful? Give feedback.
-
Huge: https://devblogs.microsoft.com/commandline/windows-terminal-preview-1-22-release/ Note the "Grapheme Cluster Support" section, especially. I think I probably speak for everyone here when I say: "FINALLY!" |
Beta Was this translation helpful? Give feedback.
-
Terminal.Gui v2.x is in development. This thread is for discussing and debating the design and implementation and plan.
Tenets for v2 (Unless you know better ones)
Please feel free to suggest other tenets or modifications to those above. I'll keep this post updated with the latest input.
Themes for v2
ConsoleDriver
architecture and implementation, especially w.r.t. Linux/curses has deep flaws and poor performance relative toWindowsDriver
on Windows.ConsoleDriver
s yet we continually get regressions and complex bugs in them.Button
and other views #2144.TextView
,TextFormatter
, etc... But we made some errors and things like word wrapping are still not as good as they need to be for a text-based library.gui.cs
design decisions, combined with subsequent upgrades have led to areas of the API that just don't make sense to new devs. One example is how weirdWindow
'sBorder
andPadding
work (and whyFrameView
exists at all). Another is the clunkiness of usingScrollView
.System.Rune
vs.Nstack
, and MAUI.These are here to cause debate and discussion. So please share your thoughts! I'll keep this post updated as the discussion progresses...
Plan for maintaining v1
v2_develop
- DONEdevelop
since v1.9. Any that we determine were REGRESSIONS from v1.8 or earlier that significantly impact devs, we target at a v1.10 release. The rest we PUNT to v2.0.develop
so all of the work that's gone into it since v1.9 is available for reference.Beta Was this translation helpful? Give feedback.
All reactions