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

Remove Readline from std-lib #8364

Merged
merged 1 commit into from
Oct 22, 2019

Conversation

ftarulla
Copy link
Collaborator

As an exercise for writing shards (and C-bindings), with @bcardiff we extract the Readline module and create a shard at crystal-lang/crystal-readline.

The v0.1.0 has the same code as in the Crystal std-lib.

It has been extracted to crystal-lang/crystal-readline
@bcardiff
Copy link
Member

While extracting this I also notice that the CRYSTAL_PATH gives more precedence to the std-lib rather than the shards.

Maybe instead of:

CRYSTAL_PATH="/usr/local/Cellar/crystal/0.31.1/src:lib"

it should be

CRYSTAL_PATH="lib:/usr/local/Cellar/crystal/0.31.1/src"

So Crystal 0.31.1 users can today add crystal-readline as a dependency and use it, even if it also exists in the std-lib.

@straight-shoota
Copy link
Member

/cc #5215

@bcardiff
Copy link
Member

It's not that I want to shrink the std-lib, but in the case of readline:

  • it is not in the prelude,
  • there is no solid specs,
  • is no longer used for the compiler, and
  • the implementation has not evolved in a long time. I doubt it is widely used.

Removing it will allow contributions in a simpler way probably and it is not critical for the std-lib.

@RX14 RX14 merged commit 27ca0dd into crystal-lang:master Oct 22, 2019
@RX14 RX14 added this to the 0.32.0 milestone Oct 22, 2019
@Fryguy
Copy link
Contributor

Fryguy commented Oct 28, 2019

Not sure how much history was in there, but it's a shame we lost the git history. In the future, we could use the following tool (disclaimer, I helped write it) - https://github.com/juliancheal/code-extractor (I also have it as a shell script in a gist here: https://gist.github.com/Fryguy/3490682c7761edeedba1ee28de5ed117)

@bcardiff
Copy link
Member

The history is very minimal in this case. Like ~10 commits. Usually, I try to keep the repo.
Thanks for that script! It might help in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants