Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

screen library: ncurses vs ncursesw #3628

Closed
mc-butler opened this issue Mar 29, 2016 · 24 comments
Closed

screen library: ncurses vs ncursesw #3628

mc-butler opened this issue Mar 29, 2016 · 24 comments
Assignees
Labels
area: build Build system and (cross-)compilation prio: low Minor problem or easily worked around
Milestone

Comments

@mc-butler
Copy link

Important

This issue was migrated from Trac:

Origin https://midnight-commander.org/ticket/3628
Reporter and

Currently mc support following screen library (--with-screen=) selection:

  • slang
  • ncurses
  • ncursesw (not documented yet)

This leads to imprecision for ncurses,
because autoconf logic of ncurses detection deals (partly) with ncursesw too.

1) Exact match/use of ncurses or ncursesw
to give full control about ncurses selection.

2) Single ncurses switch
with ncursesw lib preference if both libs found.

3) Single ncurses switch
with ncurses lib preference if both libs found.

4) Ncurses and ncursesw switch
where ncurses switch also prefer ncursesw lib if both libs found.
(current state)

Before I attach patches, which way is preferred?
(I prefer exact match selection)

Note

Original attachments:

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Mar 29, 2016 at 17:36 UTC

Replying to and (#3628):

Before I attach patches, which way is preferred?
(I prefer exact match selection)

Me too.

@mc-butler
Copy link
Author

Changed by zaytsev (@zyv) on Mar 29, 2016 at 20:36 UTC (comment 2)

I'm very confused about this ticket. What is wrong with the current situation? It seems to me that option (4) makes total sense.

As far as I understand, ncursesw is the focus of current development (whereas ncurses is no longer actively developed), and it is source-compatible with ncurses, but behaves better in response to user locale settings.

Therefore, if both ncurses and ncursesw are available, and ncurses is selected as the screen library, it makes total sense to silently prefer ncursesw instead. Using ncurses if ncursesw is available doesn't bring any advantages, which would justify offering a choice. Those, who want to force ncurses for some reason can patch it themselves, but most likely they don't know what they are doing.

What am I missing?

@mc-butler
Copy link
Author

Changed by and on Mar 30, 2016 at 16:12 UTC (comment 3)

Currently Debian compile failed in combination of --with-screen=ncurses and libncursesw5-dev.
This means screen ncurses flag wrongly chosen or not for ncursesw library?

If no, why we have a screen ncursesw flag?
If yes, update manual plus strict evaluation of ncurses/ncursesw screen flag.

@mc-butler
Copy link
Author

Changed by and on Apr 1, 2016 at 21:22 UTC (comment 4)

Reflect about that issue again.

In point of mc maintenance its more practicable to have only -with-screen=ncurses
for both variation of ncurses and ncursesw. Furthermore both are compatible:
http://invisible-island.net/ncurses/ncurses.faq.html

The normal ncurses libraries support 8-bit characters. 
The ncurses library can also be configured (--enable-widec) 
to support wide-characters (for instance Unicode and the UTF-8 encoding). 
The corresponding wide-character ncursesw libraries are 
source-compatible with the normal applications. 
That is, applications must be compiled and linked against the ncursesw library.

So, agreement for that?
Then I will patch cooking for that plus including strip away --with-screen=ncursesw.

@mc-butler
Copy link
Author

Changed by zaytsev (@zyv) on Apr 3, 2016 at 18:06 UTC (comment 5)

I don't get it; in the end, you want to change from (4) to (2), is that correct?

@mc-butler
Copy link
Author

Changed by and on Apr 4, 2016 at 19:58 UTC (comment 5.6)

Replying to zaytsev:

I don't get it; in the end, you want to change from (4) to (2), is that correct?

Jep

@mc-butler
Copy link
Author

Changed by and on Apr 10, 2016 at 19:35 UTC

@mc-butler
Copy link
Author

Changed by and on Apr 10, 2016 at 19:36 UTC

@mc-butler
Copy link
Author

Changed by and on Apr 10, 2016 at 19:36 UTC

@mc-butler
Copy link
Author

Changed by and on Apr 10, 2016 at 19:36 UTC

@mc-butler
Copy link
Author

Changed by and on Apr 10, 2016 at 19:36 UTC

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on May 19, 2023 at 18:49 UTC (comment 7)

  • Component changed from mc-tty to compilation

@mc-worker mc-worker marked this as a duplicate of #4659 Mar 1, 2025
aborodin pushed a commit that referenced this issue Mar 1, 2025
Remove undocumented ncursesw flag.
ncurses and ncursesw selection by --with-screen=ncurses only.

Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
@zyv
Copy link
Member

zyv commented Mar 1, 2025

@aborodin If you don't want to open a PR, but just link a branch, unfortunately no notifications are sent and the status of the branch is not clear. The CI is failing...

My suggestion for the workflow is this:

  1. Without PR
    1. Assign issue to yourself
    2. Link a branch
    3. When ready for review, leave comment with reviewer's @mention
  2. With PR
    1. Open in draft mode if not ready
    2. Switch to normal when ready for review
    3. Invite reviewer(s) with the appropriate button

What do you think?

@aborodin
Copy link
Member

aborodin commented Mar 1, 2025 via email

@zyv zyv modified the milestones: Future Releases, 4.8.34 Mar 1, 2025
@zyv
Copy link
Member

zyv commented Mar 1, 2025

@aborodin

I dislike PRs and don't have any plans to use them for my branches.

The only reason I'm advocating PRs is that otherwise it's a pain to leave comments on the lines in the patch while reviewing. In a PR, you can highlight any line and add a comment or suggestion.

However, I can now leave comments on commits that belong to branches. I hope that you will be notified by email, and that you will be able to reply by email. If you want to use branches, this might work...

The only problem is the lack of overview. With PR, all comments remain visible, with branch/commit comments there is no page where you can see them all. But I'm very happy with the progress so far...

git pull/merge/push are enough for me.

Just note that you will need to rebase and force-push your branch to remove fixups before merging. In the past, this was not necessary, and you could rebase locally and merge to the master without force-pushing the branch.

I changed this to prevent PR merges without rebasing using the web interface. If you have a problem merging, please let me know and I will look into it. I haven't tried the manual way yet.

I've fixed that.

... for now, I have added a fixup directly to your branch. Otherwise, approved 👍

Ok.

I forgot about updating the milestone. I need to add this list to the (Trac) wiki.

@ossilator
Copy link

I dislike PRs and don't have any plans to use them for my branches.

mind elaborating why?
PRs are just small meta objects on top of the branches that you have anyway.

forbidding direct pushes would have the benefit of not needing commit notifications to stay on top activity, plus the obvious benefit of having all commits reviewed, if only by the committer himself.

if you have a problem with the GH interface specifically, how about gerrit? i'm all for bridging to gerrithub.io, which i'd use with my client scripts.

@zyv
Copy link
Member

zyv commented Mar 1, 2025

if you have a problem with the GH interface specifically, how about gerrit? i'm all for bridging to gerrithub.io, which i'd use with my client scripts.

Do you have a good example of how Gerrit feels these days? When I looked at it a decade ago, it was actually quite okay, but unfortunately focused on single commits (one commit = one review, with subsequent iterations).

This might be fine for some (large?) projects, but I felt that it mostly introduced too much overhead compared to small branches with a few topical commits being reviewed as a batch, so I settled on Upsource for my company (after they somewhat fixed the handling of force-pushes).

I'm now very happy with how GitHub handles force-pushes and added commits with respect to line comments, and I really enjoy pull requests, which I didn't before. So is there still a good argument for Gerrit?

@ossilator
Copy link

well, actually, the focus on atomic commits is the primary strength of gerrit, and conversely why i find GH reviews "suboptimal", even if it got better over the years. reviewing the batch as a whole can still be done on GH, as gerrithub is a bidirectional bridge (supposedly; i haven't actually used it properly yet). on the client side not much changes if you rebase/squash everything into shape anyway, and with my scripts it's almost as if one was direct-pushing, except that the actual integration is delayed.

note that integration can be done with a single merge for an entire series when the repo is configured that way, so the resulting history should look as before if you want it that way.

@aborodin
Copy link
Member

aborodin commented Mar 2, 2025 via email

@zyv
Copy link
Member

zyv commented Mar 2, 2025

Approved or not? Is there any way to make this info as special label/state/whatever?

"Otherwise approved" means that I approve if you approve my fixup.

Is there any way mo implement states "on review", "on hold", "on rework" for issue?

The only way to do this with issues would be to add some labels, and make sure you manually add and remove them.

However, doing exactly that will poorly replicate the functionality of pull requests, just with a different, less convenient interface. With pull requests:

  1. Draft status = "on hold"
  2. Normal status, with or without review comments = "on review"
  3. Normal status with requested changes = "on rework"
  4. Approvals = votes
  5. Enough votes = approved

But if you don't want to use PRs, why do you need labels? Why can't we just agree that comments in issues summarize state, like "ready for review" or "approved"?

@aborodin
Copy link
Member

aborodin commented Mar 2, 2025 via email

@zyv
Copy link
Member

zyv commented Mar 2, 2025

Fine. Let's do that.

Oi wei. So which labels do you want to work with (please give me a list)?

@aborodin
Copy link
Member

aborodin commented Mar 2, 2025 via email

@zyv zyv added the state: approved If not using PRs: associated branch has been approved label Mar 2, 2025
@zyv
Copy link
Member

zyv commented Mar 2, 2025

On Sun, 02 Mar 2025 02:29:15 -0800 "Yury V. Zaytsev" @.***> wrote:
Oi wei. So which labels do you want to work with (please give me a list)?
At least
state:on review
state:approved

Okay, let's start with the first two. They should work now.

aborodin pushed a commit that referenced this issue Mar 2, 2025
Remove undocumented ncursesw flag.
ncurses and ncursesw selection by --with-screen=ncurses only.

Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
aborodin added a commit that referenced this issue Mar 2, 2025
* 3628_ncursesw:
  Extend version print by glib/screen version
  Restructure ncurses term define
  Restructure ncurses defines.
  Restructure with-screen ncurses m4 logic
  Ticket #3628: ncurses vs ncursesw.
@mc-worker mc-worker removed the state: approved If not using PRs: associated branch has been approved label Mar 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: build Build system and (cross-)compilation prio: low Minor problem or easily worked around
Development

No branches or pull requests

5 participants