Comments (10)
Now, we can migrate to kotlinx-io
https://youtrack.jetbrains.com/issue/KTOR-6030/Migrate-to-new-kotlinx.io-library
from kommand.
You're right, but I'm considering whether to use okio, which is a standalone io library that might be easier for users to learn. If I'm not going to expose any 3rd party io, maybe I really need fully encapsulated io. Do you have more views on this?
from kommand.
Thanks for the reply! I think, fully incapsulating IO is a great idea, go with it if you can. This way you can decide on what actual IO backend to use and update without introducing breaking changes for the clients.
from kommand.
I have been thinking about this issue recently. Now kotlin-multiplatform does not have a standard io protocol or implementation. Although ktor-io belongs to the first-party library, it is not in the stdlib, which creates a problem. If every third-party library Providing your own set of io standards is very unfriendly to users. Every time users use a library, they need to learn the io api corresponding to the library. This is really ugly, so I considered using ktor-io at the beginning. But before kotlin officially proposes any standard library implementation, I don't think more io implementations should be added, which is meaningless work
from kommand.
Anyone can discuss below
from kommand.
In our projects we use square/okio which is nice (has 8k stars). At least, it seems more popular, so it might be better to use it, nevertheless, I'm not sure it fits you
from kommand.
In our projects we use square/okio which is nice (has 8k stars). At least, it seems more popular, so it might be better to use it, nevertheless, I'm not sure it fits you
Using okio I think is acceptable, But more votes are needed
from kommand.
this is a poll
#8
from kommand.
Any updates here?
from kommand.
In fact, the current approach is a simple io encapsulation, and the exposed APIs are readLine
and lines
.
kommand/src/commonMain/kotlin/com/kgit2/io/Reader.kt
Lines 12 to 37 in f26c061
ktor-io only acts as a middle layer. It neither makes real system calls nor uses its external API. It only acts as a buffer to assist the above API.
Therefore no changes will be made for now, the api is simple enough to provide full functionality
from kommand.
Related Issues (16)
- FR: Add timeout option HOT 3
- lines() doesn't properly handle stream HOT 3
- FR: Support LInuxArm(64) target? HOT 4
- Piped I/O example leaves process as zombie HOT 3
- cwd Doesn't seem to work (at least on Linux) HOT 3
- Q: LICENSE HOT 1
- Add support for varargs command arguments HOT 1
- Error when adding dependency
- Thank you!!
- Pipe stdout of first command to a second command HOT 2
- mingwX64 not wrking HOT 3
- Weird currentReadLine usage in `lines` method of `Reader` HOT 4
- Remove Main.kt files HOT 1
- Get exit code AND output at the same time HOT 5
- Unable to add as dependency? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kommand.