asdf-vm / asdf-vm/asdf

flexible line terminators

Open
#2,206 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Go
Stars
25.6k
Forks
941
Avg merge
9h 24m
Merged PRs (30d)
3

Description

### Is your feature request related to a problem? Please describe

Hi,

Could asdf open up the line terminator sequences supported in .tool-version files?

* LF (modern)
* CRLF (Windows)
* degenerate mixtures of LF/CRLF in poorly formatted text files

In asdf 0.15 and earlier, we seem to get subtle problems with .tool-version files that contain CRLF.

Perhaps a newer version has already addresed this. But I though I'd ask on behalf of users stuck on some older release versions.

### Describe the proposed solution

Use a generic buffered line reader to perform line termination delimiting in an OS agnostic way.

To mockup an AST regex, `/\r*\n+/m`

### Describe similar `asdf` features and why they are not sufficient

Not applicable.

### Describe other workarounds you've considered

asdf is peerless!

Contributor guide

Open the contributing guide

Research direction

Start by locating the .tool-version parsing entry point and reproduce the reported behavior with LF, CRLF, and mixed line terminators. Done means asdf reads all three forms consistently, including files from older release versions, without changing other version-file behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.