Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Sep 14 20:21
    MasterEric opened #72
  • Sep 11 14:00

    kevinresol on master

    Quote download location to work… Merge pull request #165 from se… (compare)

  • Sep 11 14:00
    kevinresol closed #165
  • Sep 11 14:00
    kevinresol closed #162
  • Sep 11 14:00
    kevinresol commented #165
  • Sep 11 13:59
    kevinresol commented #165
  • Sep 11 13:59
    kevinresol review_requested #165
  • Sep 02 10:51
    sebthom commented #165
  • Sep 02 10:51
    sebthom opened #165
  • Aug 31 17:02

    dependabot[bot] on npm_and_yarn

    (compare)

  • Aug 31 17:02
    dependabot[bot] closed #161
  • Aug 31 17:02
    dependabot[bot] commented #161
  • Aug 31 17:02
    dependabot[bot] labeled #164
  • Aug 31 17:02
    dependabot[bot] opened #164
  • Aug 31 17:02

    dependabot[bot] on npm_and_yarn

    Bump tar from 6.0.1 to 6.1.9 B… (compare)

  • Aug 30 09:24

    back2dos on v15.11.4

    (compare)

  • Aug 30 09:24

    back2dos on master

    Don't install 64 bit binaries o… 15.11.4 (compare)

  • Aug 30 09:23
    back2dos commented #163
  • Aug 30 09:18
    back2dos reopened #68
  • Aug 30 09:18
    back2dos commented #68
Juraj Kirchheim
@back2dos
if you say so
I'm confused what you're asking for ... I asked about a package manager that does what you want and the only example you've produced is editing a file by hand and then running a command ... this is already possible
Philippe
@elsassph
I can't just change the version in lix's generated hxml - the version appears half a dozen of times and I need to also update the commit hash. Eh nevermind I guess, it's visibly not a concern for you so I'll try to spec it and maybe propose a PR.
Juraj Kirchheim
@back2dos
well, I just type in stuff and when that becomes a nuisance, I make a script
e.g. you can put this into ./scripts/Git.hx:
package ;

import Sys.*;

class Git {
  static function main() 
    switch args() {
      case [repo, version]:
        exit(command('lix', ['install', 'git:some.domain/$repo.git#$version']));
      default:
        println('name and version required');
        exit(1);
    }
}
Juraj Kirchheim
@back2dos
and then lix Git somelib someversion will get the what you want (if I understand what you want)
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
Peter Achberger
@Antriel
If I would use postDownload hook to install some node modules into the library folder, is there some way to be able to require them when running node from the project folder?
Juraj Kirchheim
@back2dos
yes, but I wouldn't recommend that ... it's not really in line with how require works
instead, you should use postInstall to install the packages in the project folder