Giter Club home page Giter Club logo

ktx's Introduction

Hi there ๐Ÿ‘‹

๐Ÿ”ญ Iโ€™m currently working on

๐ŸŒฑ Iโ€™m currently learning

  • Android
  • Kotlin Native

๐Ÿ‘ฏ Iโ€™m looking to collaborate on

  • Kotlin Multiplatform

๐Ÿค” Iโ€™m looking for help with

๐Ÿ’ฌ Ask me about

  • Kotlin/JS
  • Kotlin/Multiplatform
  • Gradle

๐Ÿ“ซ How to reach me

โšก Fun fact

  • For whatever reason I've graduated in Bsc Economics...

ktx's People

Contributors

krzema12 avatar mpetuska avatar renovate[bot] avatar tristancamejo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

ktx's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/check.yml
  • actions/checkout v3
  • actions/setup-java v3
  • actions/cache v3
  • github/codeql-action v2
  • actions/upload-artifact v3
.github/workflows/pr.yml
  • actions/checkout v3
  • actions/cache v3
  • actions/setup-java v3
  • actions/upload-artifact v3
.github/workflows/release.yml
  • actions/checkout v3
  • actions/cache v3
  • actions/setup-java v3
  • actions/upload-release-asset v1
  • actions/checkout v3
  • actions/cache v3
  • actions/setup-java v3
gradle
settings.gradle.kts
  • de.fayard.refreshVersions 0.51.0
  • com.gradle.enterprise 3.12.3
build.gradle.kts
build-conventions/settings.gradle.kts
  • de.fayard.refreshVersions 0.51.0
  • com.gradle.enterprise 3.12.3
build-conventions/build.gradle.kts
build-conventions/src/main/kotlin/convention.common.gradle.kts
build-conventions/src/main/kotlin/convention.detekt.gradle.kts
build-conventions/src/main/kotlin/convention.git-hooks.gradle.kts
build-conventions/src/main/kotlin/convention.kjvm-app.gradle.kts
build-conventions/src/main/kotlin/convention.local-properties.gradle.kts
build-conventions/src/main/kotlin/dependency-analysis.gradle.kts
cli/build.gradle.kts
  • io.insert-koin:koin-core 3.3.2
  • io.insert-koin:koin-logger-slf4j 3.3.0
  • io.insert-koin:koin-annotations 1.1.0
  • io.insert-koin:koin-ksp-compiler 1.1.0
  • io.insert-koin:koin-test-junit5 3.3.2
gradle-wrapper
gradle/wrapper/gradle-wrapper.properties
  • gradle 8.0-rc-2

  • Check this box to trigger a request for Renovate to run again on this repository

"Incompatibility" issue when trying to run a script

Hi @mpetuska!

I'm giving ktx a try by running:

> ktx install https://raw.githubusercontent.com/krzema12/PersonalConfigs/master/scripts/removeLocalMergedBranches.main.kts --alias=remove-merged-branches

It's a script I've been using for a year now.
This installation completes with success - nothing on stdout, 0 exit code.

Checking ~/.ktx dir:

> ll ~/.ktx/bin
total 0
lrwxr-xr-x  1 piotr  staff    60B Jan 19 09:13 remove-merged-branches@ -> /Users/piotr/.ktx/scripts/removeLocalMergedBranches.main.kts
> head /Users/piotr/.ktx/scripts/removeLocalMergedBranches.main.kts
#!/usr/bin/env -S ktx execute

@file:DependsOn("org.eclipse.jgit:org.eclipse.jgit:4.6.0.201612231935-r")

import org.eclipse.jgit.api.Git
import org.eclipse.jgit.api.ListBranchCommand
import java.io.File
import kotlin.system.exitProcess

fun red(text: String) = "\u001B[31m$text\u001B[0m"

Everything looks as expected.

I'd expect that calling remove-merged-branches runs the script, but it doesn't work:

-bash: remove-merged-branches: command not found

Let's try to call the symlinked script:

> ~/.ktx/bin/remove-merged-branches 
Removing /Users/piotr/.ktx/bin/remove-merged-branches due to incompatibility with [email protected]. Please reinstall it.
Usage: ktx execute [OPTIONS] TARGET [ARGS]...

Error: Invalid value for "TARGET": File "/Users/piotr/.ktx/bin/remove-merged-branches" does not exist.

Also, the symlink disappeared:

> ll ~/.ktx/bin
total 0

I'm on MacBook Pro M2, Ventura 13.1, bash 3.2.57(1)-release.

JAR support

Implement support for running executable jars from mavenCentral. To do so, generate a kts that adds a jar as dependency and invokes its main method.

WARNINGs on stdout

I am trying to replace kscript with ktx here https://github.com/py2many/py2many/blob/main/tests/test_cli.py#L59

To do that, ktx needs to be able to run files like https://github.com/py2many/py2many/blob/main/tests/expected/coverage.kt , and https://github.com/py2many/py2many/blob/main/tests/expected/sys_argv.kt , and capture their stdout .

What happens is ktx emits on stdout Kotlin compilation warnings:

WARNING: Condition '1 != null' is always 'true'
WARNING: Variable '_escape_quotes' is never used
WARNING: The expression is unused
WARNING: Variable '_c1' is never used
WARNING: Variable '_c2' is never used
WARNING: Parameter 'argv' is never used

They should be on stderr, or just hidden unless explicitly requested.

And I do not get any of the expected output.

[Feature request] Manage/auto-update changes of packages/scripts

I installed my script with

> ktx install https://raw.githubusercontent.com/krzema12/PersonalConfigs/master/scripts/removeLocalMergedBranches.main.kts --alias=remove-merged-branches

but I guess ktx just fetches it once and doesn't check for changes, right? I thought ktx can be made aware of versions somehow. For Maven packages it will be much easier, and for scripts, I can think of several approaches:

  • inferring actual commit SHA-1 and using it as version
  • simply detecting that the remote file changed

I'd then see a feature of updating all/chosen packages/scripts, perhaps also doing it automatically or perhaps only checking for updates.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.