Git Error: malformed URL ''; class=Net (12); code=InvalidSpec (-12) - rust-cargo

when I running "cargo generate --git https://github.com/rustwasm/wasm-pack-template",
the terminal show error "Unable to load config file: /Users/***/.cargo/cargo-generate.toml
Error: ⛔ Git Error: malformed URL ''; class=Net (12); code=InvalidSpec (-12)"
I has run "cargo install cargo-generate".
what's the cause of the?

The first part of the message is more of a warning. One can create an empty $HOME/.cargo/cargo-generate.toml to silence it. The file is described in https://docs.rs/crate/cargo-generate/0.5.1. It appears it is not in the latest version of that documentation.
And I suspect for me the reason this was failing is my ~/.gitconfig has the lines
[url "ssh://git#github.com/"]
insteadOf = https://github.com/
I didn't want to change my .gitconfig but I found this alternate path to use that makes cargo-generate and git happy.
cargo generate --git git#github.com:rustwasm/wasm-pack-template.git

Related

bazel could not build anything after i delete some files in my .cache in my home directory

I tried to reinstall bazel, so i deleted all the bazel files in the .cache in my home directory.
After i reinstall bazel using the steps provided on the official website, it always returned me error when i tried to compile something.
the error message is:
ERROR:/home/user/..cache/bazel/_bazel_user/99057f7f4b9c8642f84cd97e14ed25f4/external/build_bazel_rules_apple/apple/internal/ios_rules.bzl:164:9: name 'coverage_common' is not defined
ERROR: /home/user/.cache/bazel/_bazel_user/99057f7f4b9c8642f84cd97e14ed25f4/external/build_bazel_rules_apple/apple/internal/testing/apple_test_bundle_support.bzl:303:9: name 'coverage_common' is not defined
ERROR: Skipping ':all': while parsing ':all': error loading package '': in /home/user/.cache/bazel/_bazel_user/99057f7f4b9c8642f84cd97e14ed25f4/external/com_github_grpc_grpc/bazel/grpc_build_system.bzl: in /home/user/.cache/bazel/_bazel_user/99057f7f4b9c8642f84cd97e14ed25f4/external/build_bazel_rules_apple/apple/ios.bzl: in /home/user/.cache/bazel/_bazel_user/99057f7f4b9c8642f84cd97e14ed25f4/external/build_bazel_rules_apple/apple/internal/testing/ios_rules.bzl: Extension 'apple/internal/testing/apple_test_bundle_support.bzl' has errors
ERROR: while parsing ':all': error loading package '': in /home/user/.cache/bazel/_bazel_user/99057f7f4b9c8642f84cd97e14ed25f4/external/com_github_grpc_grpc/bazel/grpc_build_system.bzl: in /home/user/.cache/bazel/_bazel_user/99057f7f4b9c8642f84cd97e14ed25f4/external/build_bazel_rules_apple/apple/ios.bzl: in /home/user/.cache/bazel/_bazel_user/99057f7f4b9c8642f84cd97e14ed25f4/external/build_bazel_rules_apple/apple/internal/testing/ios_rules.bzl: Extension 'apple/internal/testing/apple_test_bundle_support.bzl' has errors
How can i fix these errors?

How can I fix the nix-shell error "error: creating directory '/nix/var': Permission denied"?

I'm getting strang errors while trying to run nix-shell suddenly. It used to work fine, but then through no fault of my own I started getting these errors:
jon#jon-laptop ~/D/C/D/0/color-word-analyzer (master)> nix-shell
building '/nix/store/02szzrd1w7wqmnkh9is5qlx64m7r6f1z-cabal2nix-color-word-analyzer.drv'...
installing
error: creating directory '/nix/var': Permission denied
error: creating directory '/nix/var': Permission denied
** need a revision for VCS when the hash is given. skipping.
** need a revision for VCS when the hash is given. skipping.
** need a revision for VCS when the hash is given. skipping.
** need a revision for VCS when the hash is given. skipping.
cabal2nix: user error (Failed to fetch source. Does this source exist? Source {sourceUrl = "/nix/store/fvka3nd7slnqgjvfkjg649v77y10lc89-color-word-analyzer", sourceRevision = "", sourceHash = Guess "", sourceCabalDir = ""})
builder for '/nix/store/02szzrd1w7wqmnkh9is5qlx64m7r6f1z-cabal2nix-color-word-analyzer.drv' failed with exit code 1
error: build of '/nix/store/02szzrd1w7wqmnkh9is5qlx64m7r6f1z-cabal2nix-color-word-analyzer.drv' failed
Color-word analyzer is the name of the Haskell project I'm developing. The default.nix for it is here and is pretty simple, so I don't get why this would be causing these errors.
It looks like cabal2nix is invoking a Nix command inside the sandbox. This is not permitted and probably happened by mistake in the version of Nixpkgs in your NIX_PATH. I was able to build the project with
nix-build -I nixpkgs=channel:nixos-unstable
Off-topic: recursive nix invocation will be supported with some restrictions for purity and hermeticity of results.

Why have I errors when installing from Luarocks?

I am the developer of this small library: https://github.com/martin-damien/babel and I have a problem with Luarocks releases.
From source
When I install from source with Luarocks I have no problem:
$ luarocks make --local rockspecs/babel-1.2-2.rockspec
From internet
But when deployed (using: tag master, add new rockspec release and publish to Luarocks), I can't install using
$ luarocks install --local babel
Because I encounter the following error:
Installing https://luarocks.org/babel-1.2-2.src.rock...
Using https://luarocks.org/babel-1.2-2.src.rock... switching to 'build' > mode
stat: malsukcesis eltrovi statinformon pri «locales/zh-HK.lua»: No such > file or directory
Error: Build error: Failed installing locales/zh-HK.lua in /home/damien/.luarocks/lib/luarocks/rocks/babel/1.2-2/lua/locales/zh-HK.lua: locales/zh-HK.lua: No such file or directory
As you can see in https://github.com/martin-damien/babel/issues/14 the error occure on different files (but until now, only with locale files, not with the babel.lua file).
I have no idea why it randomly crash like this, so if someone know why or have an idea from where it could come from...
Thanks in advance,
Damien
The location of the files in the build.modules table is (from the docs on the rockspec format):
relative to source.dir
Where source.dir is
source.dir (string) - the name of the directory created when the source archive is unpacked. Can be omitted if it can be inferred from the source.file field. Example: "luasocket-2.0.1"
and source.file is
source.file (string) - the filename of the source archive. Can be omitted if it can be inferred from the source.url field. Example: "luasocket-2.0.1.tar.gz"
You don't specify source.dir or source.file in your rockspec but you do set source.url (because you have to).
So you have source.url = https://github.com/martin-damien/babel/archive/v1.2-2.zip which (presumably) ends up with source.file = v1.2-2.zip and then source.dir = v1.2-2 but your zip file extracts into a babel-1.2 so luarocks can't find your source files. (The screenshot in the linked issue seems to indicate that luarocks uses source.file = v1.2.zip and the archive extracts to babel-1.2 but I'm not sure how that's possible.)
Add dir = "babel-1.2" to your rockspec's source table an I expect it will work.

OTP14B02 configure error

I have tried to install OTP14B02 on OpenSolaris and i get the following error at calling ./configure:
muzaaya#opensolaris:~/Desktop/software and data/otp_src_R14B02# ./configure
Ignoring the --cache-file argument since it can cause the system to be erroneously configured
Disabling caching
Usage: cd [-LP] [directory]
Or: cd [ options ] old new
configure: error: cannot find install-sh or install.sh in export/home/muzaaya/Desktop/software and data/otp_src_R14B02/erts/autoconf /export/home/muzaaya/Desktop/software and data/otp_src_R14B02//export/home/muzaaya/Desktop/software and data/otp_src_R14B02/erts/autoconf
What could be causing this problem and how can i overcome it?
Whenever I see a space in a path on any system all kinds of bells an whistles goes off, it shouldn't matter but sometime it does. Have you tried moving to a path without spaces in it?
Also, as it says, it failed to find /export/home/muzaaya/Desktop/software and data/otp_src_R14B02/erts/autoconf/install.sh, does that file exist on your system?

problem on setting symfony:sf_sandbox installation failed

im new with symfony....plshelp me how to open the symfony system..
Now i already install symphony version 1.0.0 using the tutorial..
1)When i check at cmd..xampp\php> php –v and symphony –V all is ok..
But when i check for xampp\htdocs\sf_sandbox> symphony –V(i got this msg...)
C:\xampp\htdocs\sf_sandbox>symfony -V
'php.exe' is not recognized as an internal or external command, operable program or batch file.
2)one more problem is when i try run my system at localhost...http://localhost/projects(i got error..)
Warning: require_once(C:\xampp\htdocs\projects\config/../lib/symfony/util/sfCore.class.php) [function.require-once]: failed to open stream: No such file or directory in C:\xampp\htdocs\projects\apps\index\config\config.php on line 7
Fatal error: require_once() [function.require]: Failed opening required 'C:\xampp\htdocs\projects\config/../lib/symfony/util/sfCore.class.php' (include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\projects\apps\index\config\config.php on line 7
http://www.programmershere.com/questions-answers/482899-problem-sf_sandbox-installation-failed-check-symfony-v.html#post482904
It appears that in your sf_sandbox installation, you have an incorrect php.exe path.
Edit the symfony.bat file in you sf_sandbox installation.
you'll find something like this
set PHP_COMMAND=php.exe
Replace php.exe with the path of your php.exe file. eg. c:\xampp\php\php.exe
Check the symfony path in your project configuration
sf_sandbox\config\ProjectConfiguration.class.php
Make sure the first "require_once" is pointing to the correct symfony installation
require_once dirname(FILE).'/../lib/symfony/autoload/sfCoreAutoload.class.php';
And, symfony is not spelled as symphony. ;)

Resources