Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Nov 22 14:02
    kevinresol commented #68
  • Nov 21 21:15
    nulld opened #68
  • Nov 03 12:32

    back2dos on master

    Update README.md Merge pull request #153 from Ri… (compare)

  • Nov 03 12:32
    back2dos closed #153
  • Nov 03 12:32
    back2dos commented #153
  • Nov 03 11:26
    RichardBray opened #153
  • Oct 31 11:31
    flammehawk opened #152
  • Oct 29 14:34

    kevinresol on master

    Guess cp for the kha ecosystem (compare)

  • Oct 29 13:01

    kevinresol on master

    Update haxeshim Release 15.10.1 (compare)

  • Oct 29 13:01

    kevinresol on v15.10.1

    (compare)

  • Oct 29 12:59

    kevinresol on master

    Fix shebang (compare)

  • Oct 29 12:54
    kevinresol closed #151
  • Oct 29 12:54

    kevinresol on master

    Closes #151 (compare)

  • Oct 29 12:52

    kevinresol on master

    Support main in haxelib.json (h… (compare)

  • Oct 29 12:07

    kevinresol on v15.10.0

    (compare)

  • Oct 29 12:07

    kevinresol on master

    Release 15.10.0 (compare)

  • Oct 29 12:06
    kevinresol closed #63
  • Oct 29 12:06

    kevinresol on master

    Update git submodules by defaul… (compare)

  • Oct 12 10:28
    nadako opened #151
  • Oct 12 10:24
    nadako commented #122
Juraj Kirchheim
@back2dos
Philippe
@elsassph
Look, I've been trying to convey that I'd like a built-in CLI option and you continue responding with variations of "type it or write a script" :D
Juraj Kirchheim
@back2dos
well, perhaps you should state your problem, rather than halfheartedly describing a feature ^^
I fail to see how lix set-version libname#1.2.3 solves a problem that e.g. lix Git libname 1.2.3 doesn't
Kevin Leung
@kevinresol
well I guess the issue of such solution is that you will have to copy the same script to every project?
Juraj Kirchheim
@back2dos
hmm, you can also make a lib called set-version and then lix set-version will call into that ... and you can make a lib that basically just bundles such "extensions" as dependencies
Kevin Leung
@kevinresol
using libs as lix extension seems quite practical
and interesting
Philippe
@elsassph
But I have stated the problem! For a git dependencies, a CLI option to change the branch/version of the dep without having to specify the git URL. I'm not sure how to describe it differently...
Now using a lib itself for that might be a solution. I'll explore that.
Philippe
@elsassph
I'm trying to dev an option in lix client but it's a bit of a hassle to run it locally from source...
lix download / npx lix download sometimes work, sometimes no. Once I got the build to work I tried to use it in another project using npm link and now building doesn't work with a
sh: /Users/philippe.elsass/.nvm/versions/node/v10.15.3/bin/haxe: Permission denied
I'm still probably going to use the run-lib approach eventually but I wanted to try how contributing would look like.
Kevin Leung
@kevinresol
usually I just run the built lix.js directly
sth like /path/lix.client/bin/lix.js build.hxml
Philippe
@elsassph
Ok. I had to npm unlink then npm install lix -g again for things to work
I'll use the direct path instead I guess :D
Philippe
@elsassph
Ok so I have a generic script of what I want:
import sys.io.File;
import sys.FileSystem;
import Sys.*;

class SetVersion {
    static function main()
        switch args() {
            case [name, version]:
                final path = './haxe_libraries/$name.hxml';
                if (!FileSystem.exists(path)) {
                    println('Library $name not found at $path');
                    exit(2);
                }
                final hxml = File.getContent(path);
                final reLib = new EReg('download "([^#]+)#[^"]+"');
                if (reLib.match(hxml)) {
                    final lib = reLib.matched(1);
                    exit(command('lix', ['install', '$lib#$version', 'as', name]));
                } else {
                    println('$path doesn\'t include a recognizable lix download URL pattern');
                    exit(1);
                }
            default:
                println('Name and version required');
                exit(1);
        }
}
Philippe
@elsassph
I would still favor something built in the lix client.
Emugel
@emugel
Philippe, just in case this hasn't been mentionned. Github URLs can be shortened as in ‘lix install gh:username/repo#tag‘, this saves about 19chars compared to the full url.
(In that case maybe it is not that painful, but if it's not github it wont help)
Kevin Leung
@kevinresol
that syntax uses the public http protocol to download a zip file, won't help if one wants to use the git protocol (e.g. for ssh auth, etc)
Philippe
@elsassph
@emugel thanks but our git repos aren't supported by lix
Philippe
@elsassph
Kevin Leung
@kevinresol
ok this seems to make lix works with Kha:
// khafile.js
function addLixLibrary(name) {
    for (line of require("fs").readFileSync(`haxe_libraries/${name}.hxml`).toString().split("\n"))
        project.addParameter(line);
}
Peter Achberger
@Antriel
I vaguely remember seeing some haxelib that had some postinstall thing for npm modules... anyone knows some example for this pattern?
I'm trying to keep my projects reproducible, and one more complex part is generating and processing css files. I'm thinking that it could be some separate haxelib that would generate the file based on given configuration, but for that it basically needs to have its own package.json and download npm stuff, etc.
I wonder how to approach it.
Gabriel Hayes
@piboistudios
How do I resolve this issue again? I ran into this in the past and I can't remember what I did to deal with it, think it had to do with some lingering packages...
Error: Cannot find module 'C:\Users\gabri\AppData\Roaming\npm\node_modules\haxeshim\bin\nekoshim.js'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:965:15)
    at Function.Module._load (internal/modules/cjs/loader.js:841:27)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
    at internal/main/run_main_module.js:17:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}
(when running haxelib run <haxelib>)
Gabriel Hayes
@piboistudios
Well.. I just reinstalled haxeshim as a workaround but I'm pretty sure you guys deprecated that a long time ago
Can anyone shed light on how to completely remove dependence on haxeshim? I reinstalled Haxe completely and it still seems to be looking for haxeshim when using haxelib
Kevin Leung
@kevinresol
what is your lix version
Kevin Leung
@kevinresol
@back2dos is there a way to print out the path of the haxe folder/binary for current scope?
Kevin Leung
@kevinresol
ok I made this work finally lix run Kha html5
Juraj Kirchheim
@back2dos
\o/
Kevin Leung
@kevinresol
But I still need a easy way to get the path of the Haxe folder, preferably a variable usable in the @run directive
Because kha bundles it's own Haxe binary and I want to override it
Kevin Leung
@kevinresol
and need some way to customize the @run directive
Gabriel Hayes
@piboistudios
@kevinresol Sorry, Lix v is 15.9.1
But its a local install, I don't have a lix globally