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

Merge sub-crates to the crossterm crate #265

Closed
43 tasks done
zrzka opened this issue Sep 30, 2019 · 2 comments
Closed
43 tasks done

Merge sub-crates to the crossterm crate #265

zrzka opened this issue Sep 30, 2019 · 2 comments
Labels
in_progress is being worked on

Comments

@zrzka
Copy link
Contributor

zrzka commented Sep 30, 2019

Goal

Provide all the features we do provide now through the crossterm crate only. Archive sub-crates and inform all users.

This does not include crossterm_winapi, which can still be used by anyone outside the crossterm ecosystem.

We will end up with three active repositories:

  • crossterm-rs/crossterm
  • crossterm-rs/crossterm-winapi
  • crossterm-rs/examples

Motivation

There're dependencies between sub-crates we would like to avoid. Some of them are also using sys module, which needs to be public, but it shouldn't be. It's not part of the public API contract.

There're inconsistencies in examples, book, readmes, ... Some of the use crossterm crate with features, some of the use crossterm-* sub-crates, ... User can be puzzled what to use. In fact, it doesn't matter what the user will use, but the question is why we do provide two ways to achieve same thing.

And the last one is crossterm_utils, which is published as a crate, but it's not useful outside of them crossterm ecosystem.

Timeframe

There's no date set. I would like to focus on phase 1 now to finish the cleanup process I started. Once I finish it, I'll focus on bugs. Then, can be even distant future, discuss with Timon if it's the right time to merge.

Phase 1 - Cleanup

Improve & polish crates public (docs.rs & README) documentation (@zrzka):

This includes copying the book chapters to their respective lib.rs modules.

Phase 2 - Book removal

Then remove the book references from:

Phase 3 - Bug fixing

Fix known bugs. The motivation here is to avoid archiving (GH) / deprecating (crates.io) buggy crates. Not all bugs can be fixed, especially those we don't know about, but rest should be fixed.

List of issues/tasks

Windows related

All platforms

UNIX

Reminder

Just a check to go through the issues again if there isn't any new critical issue.

  • Known bugs fixed and we're happy to proceed with phase 4

Phase 4 - Release

For every sub-crate:

  • Add a note to the README that the crate is deprecated and no longer maintained.
  • Add a note to the lib.rs that the crate is deprecated and no longer maintained.
  • Bump patch in the Cargo.toml and add [badges] maintenance = { status = "deprecated" }
  • Update CHANGELOG.md with the same info
  • Release
  • Archive on the GitHub

crossterm crate

By the end of this phase, all sub-crates are polished, hopefully, bug-free and marked as deprecated.

Phase 5 - Merge

For every sub-crate

Stop accepting sub-crates PRs (already archived) and copy the code to the crossterm crate. This step requires (for every sub-crate):

  • copy the code to the respective crossterm module (crossterm_cursor -> cursor)
  • feature gate the module and root re-exports
  • fix docstring docs/examples (use crossterm_cursor -> crossterm)
  • fix paths (crate will differ, etc.)
  • update features (if there's a sub-crate dependency, like input requires screen, the input feature must enable screen feature as well)
  • utils
  • screen
  • style
  • input
  • cursor
  • terminal

crossterm crate

Once everything is merged, documentation is updated, etc.

  • Add a note to the README that all the subcrates are deprecated/no longer maintained
  • Merge the old command API docs & emphasis that it's recommended to use it
  • Bump patch and release new crossterm crate version

Phase 6 - Inform users

Not need to inform the following projects

All of them are using crossterm crate directly.

@Canop
Copy link
Contributor

Canop commented Oct 22, 2019

Beautiful!
Well done.

@TimonPost
Copy link
Member

Everyone that contributed to this version thanks! https://crates.io/crates/crossterm/0.12.1

@TimonPost TimonPost unpinned this issue Oct 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in_progress is being worked on
Projects
None yet
Development

No branches or pull requests

3 participants