Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rebar3 fails to "fetch" dependency when i restart my app #1292

Closed
drozzy opened this issue Aug 5, 2016 · 3 comments
Closed

Rebar3 fails to "fetch" dependency when i restart my app #1292

drozzy opened this issue Aug 5, 2016 · 3 comments
Labels
duplicate help wanted unlikely to be tackled by core maintainers Windows platform-specific issue

Comments

@drozzy
Copy link

drozzy commented Aug 5, 2016

I have placed a depedency in my rebar.config like so:

{deps, [
  {gproc, "0.5.0"},
  {uuid, {git, "[email protected]:avtobiff/erlang-uuid.git", {tag, "v0.5.0"}}}
]}.

Environment

$ ./rebar3 report shell
Rebar3 report
 version 3.2.0
 generated at 2016-08-05T04:39:17+00:00
=================
Please submit this along with your issue at https://github.com/erlang/rebar3/issues (and feel free to edit out private information, if any)
-----------------
Task: shell
Entered as:
  shell
-----------------
Operating System: win32
ERTS: Erlang/OTP 19 [erts-8.0] [64-bit] [smp:12:12] [async-threads:0]
Root Directory: c:/Program Files/erl8.0
Library directory: c:/Program Files/erl8.0/lib
-----------------
Loaded Applications:
bbmustache: 1.0.4
certifi: 0.4.0
cf: 0.2.1
common_test: 1.12.2
compiler: 7.0
crypto: 3.7
cth_readable: 1.2.2
dialyzer: 3.0
edoc: 0.7.19
erlware_commons: 0.21.0
eunit: 2.3
eunit_formatters: 0.3.1
getopt: 0.8.2
inets: 6.3
kernel: 5.0
providers: 1.6.0
public_key: 1.2
relx: 3.19.0
sasl: 3.0
snmp: 5.2.3
ssl_verify_hostname: 1.0.5
stdlib: 3.0
syntax_tools: 2.0
tools: 2.8.4

-----------------
Escript path: c:/Users/drozdyuka/snip/snip/rebar3
Providers:
  app_discovery as clean compile compile cover ct deps dialyzer do edoc escriptize eunit help install install_deps list lock new path pkgs release relup report shell state tar tree unlock update upgrade upgrade upgrade version xref
  • I am running rebar 3.2.0

Current behaviour

The first time I start the:

rebar3 shell

it works fine. It fetches the UUID depdency fine.

However the second time, I get the error:

$ ./rebar3 shell
===> Verifying dependencies...
===> Upgrading uuid ({git,"[email protected]:avtobiff/erlang-uuid.git",
                                 {ref,"--git-dir=c:/Users/drozdyuka/Projects/snip/_build/default/lib/uuid/.git\n--work-tree=c:/Users/drozdyuka/Projects/snip/_build/default/lib/uuid\nfbf7cf5932f21c7d569c90ed8fe5934528ca0c9d"}})
===> Failed to fetch and copy dep: {git,"[email protected]:avtobiff/erlang-uuid.git",
                                  {ref,
                                      "--git-dir=c:/Users/drozdyuka/Projects/snip/_build/default/lib/uuid/.git\n--work-tree=c:/Users/drozdyuka/Projects/snip/_build/default/lib/uuid\nfbf7cf5932f21c7d569c90ed8fe5934528ca0c9d"}}

Note, that the error goes away again if I delete the rebar.lock file.

I am running git version 2.9.0:

$ git --version
git version 2.9.0.windows.1

Describe the current behaviour. In case of a failure, crash, or exception, please include the result of running the command with debug information:

DEBUG=1 rebar3 <my failing command>
$ DEBUG=1 ./rebar3 shell
===> Expanded command sequence to be run: [{default,app_discovery},
                                                  {default,install_deps},
                                                  {default,lock},
                                                  {default,compile},
                                                  {default,shell}]
===> Evaluating config script "c:/Users/drozdyuka/Projects/snip/_build/default/lib/gproc/rebar.config.script"
===> Verifying dependencies...
===> Evaluating config script "c:/Users/drozdyuka/Projects/snip/_build/default/lib/gproc/rebar.config.script"
===> sh info:
        cwd: "c:/Users/drozdyuka/Projects/snip"
        cmd: git rev-parse -q HEAD

===>    opts: [{cd,"c:/Users/drozdyuka/Projects/snip/_build/default/lib/uuid"}]

===> Port Cmd: cmd /q /c git rev-parse -q HEAD
Port Opts: [{cd,"c:/Users/drozdyuka/Projects/snip/_build/default/lib/uuid"},
            exit_status,
            {line,16384},
            use_stdio,stderr_to_stdout,hide,eof]

===> Comparing git ref --git-dir=c:/Users/drozdyuka/Projects/snip/_build/default/lib/uuid/.git
--work-tree=c:/Users/drozdyuka/Projects/snip/_build/default/lib/uuid
fbf7cf5932f21c7d569c90ed8fe5934528ca0c9d with 585c2474afb4a597ae8c8bf6d21e5a9c73f18e0b
===> Upgrading uuid ({git,"[email protected]:avtobiff/erlang-uuid.git",
                                 {ref,"--git-dir=c:/Users/drozdyuka/Projects/snip/_build/default/lib/uuid/.git\n--work-tree=c:/Users/drozdyuka/Projects/snip/_build/default/lib/uuid\nfbf7cf5932f21c7d569c90ed8fe5934528ca0c9d"}})
===> sh info:
        cwd: "c:/Users/drozdyuka/Projects/snip"
        cmd: git clone -n [email protected]:avtobiff/erlang-uuid.git .tmp_dir81949245109

===>    opts: [{cd,"./tmp"}]

===> Port Cmd: cmd /q /c git clone -n [email protected]:avtobiff/erlang-uuid.git .tmp_dir81949245109
Port Opts: [{cd,"./tmp"},
            exit_status,
            {line,16384},
            use_stdio,stderr_to_stdout,hide,eof]

===> sh info:
        cwd: "c:/Users/drozdyuka/Projects/snip"
        cmd: git checkout -q --git-dir=c:/Users/drozdyuka/Projects/snip/_build/default/lib/uuid/.git
--work-tree=c:/Users/drozdyuka/Projects/snip/_build/default/lib/uuid
fbf7cf5932f21c7d569c90ed8fe5934528ca0c9d

===>    opts: [{cd,"./tmp/.tmp_dir81949245109"}]

===> Port Cmd: cmd /q /c git checkout -q --git-dir=c:/Users/drozdyuka/Projects/snip/_build/default/lib/uuid/.git
--work-tree=c:/Users/drozdyuka/Projects/snip/_build/default/lib/uuid
fbf7cf5932f21c7d569c90ed8fe5934528ca0c9d
Port Opts: [{cd,"./tmp/.tmp_dir81949245109"},
            exit_status,
            {line,16384},
            use_stdio,stderr_to_stdout,hide,eof]

===> sh(cmd /q /c git checkout -q --git-dir=c:/Users/drozdyuka/Projects/snip/_build/default/lib/uuid/.git
--work-tree=c:/Users/drozdyuka/Projects/snip/_build/default/lib/uuid
fbf7cf5932f21c7d569c90ed8fe5934528ca0c9d)
failed with return code 129 and the following output:
error: unknown option `git-dir=c:/Users/drozdyuka/Projects/snip/_build/default/lib/uuid/.git'
usage: git checkout [<options>] <branch>
   or: git checkout [<options>] [<branch>] -- <file>...

    -q, --quiet           suppress progress reporting
    -b <branch>           create and checkout a new branch
    -B <branch>           create/reset and checkout a branch
    -l                    create reflog for new branch
    --detach              detach the HEAD at named commit
    -t, --track           set upstream info for new branch
    --orphan <new-branch>
                          new unparented branch
    -2, --ours            checkout our version for unmerged files
    -3, --theirs          checkout their version for unmerged files
    -f, --force           force checkout (throw away local modifications)
    -m, --merge           perform a 3-way merge with the new branch
    --overwrite-ignore    update ignored files (default)
    --conflict <style>    conflict style (merge or diff3)
    -p, --patch           select hunks interactively
    --ignore-skip-worktree-bits
                          do not limit pathspecs to sparse entries only
    --ignore-other-worktrees
                          do not check if another worktree is holding the given ref
    --progress            force progress reporting


===> rebar_fetch exception throw rebar_abort [{rebar_utils,
                                                      debug_and_abort,2,
                                                      [{file,
                                                        "/home/tristan/Devel/rebar3/_build/default/lib/rebar/src/rebar_utils.erl"},
                                                       {line,577}]},
                                                     {rebar_utils,sh,2,
                                                      [{file,
                                                        "/home/tristan/Devel/rebar3/_build/default/lib/rebar/src/rebar_utils.erl"},
                                                       {line,182}]},
                                                     {rebar_fetch,
                                                      download_source_,3,
                                                      [{file,
                                                        "/home/tristan/Devel/rebar3/_build/default/lib/rebar/src/rebar_fetch.erl"},
                                                       {line,45}]},
                                                     {rebar_fetch,
                                                      download_source,3,
                                                      [{file,
                                                        "/home/tristan/Devel/rebar3/_build/default/lib/rebar/src/rebar_fetch.erl"},
                                                       {line,29}]},
                                                     {rebar_prv_install_deps,
                                                      maybe_upgrade,4,
                                                      [{file,
                                                        "/home/tristan/Devel/rebar3/_build/default/lib/rebar/src/rebar_prv_install_deps.erl"},
                                                       {line,377}]},
                                                     {rebar_prv_install_deps,
                                                      maybe_fetch,5,
                                                      [{file,
                                                        "/home/tristan/Devel/rebar3/_build/default/lib/rebar/src/rebar_prv_install_deps.erl"},
                                                       {line,304}]},
                                                     {rebar_prv_install_deps,
                                                      update_unseen_dep,9,
                                                      [{file,
                                                        "/home/tristan/Devel/rebar3/_build/default/lib/rebar/src/rebar_prv_install_deps.erl"},
                                                       {line,249}]},
                                                     {lists,foldl,3,
                                                      [{file,"lists.erl"},
                                                       {line,1263}]}]
===> Failed to fetch and copy dep: {git,"[email protected]:avtobiff/erlang-uuid.git",
                                  {ref,
                                      "--git-dir=c:/Users/drozdyuka/Projects/snip/_build/default/lib/uuid/.git\n--work-tree=c:/Users/drozdyuka/Projects/snip/_build/default/lib/uuid\nfbf7cf5932f21c7d569c90ed8fe5934528ca0c9d"}}
@ferd
Copy link
Collaborator

ferd commented Aug 5, 2016

Likely related to or duplicate of #1259

@ferd ferd added duplicate help wanted unlikely to be tackled by core maintainers Windows platform-specific issue labels Aug 5, 2016
@filmor
Copy link
Contributor

filmor commented Aug 18, 2016

Fixed already in #1206, you just have to build a new release. Same for #1259.

@ferd
Copy link
Collaborator

ferd commented Aug 18, 2016

As discussed in #1206, this is actually fixed in #1251

@ferd ferd closed this as completed Aug 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate help wanted unlikely to be tackled by core maintainers Windows platform-specific issue
Projects
None yet
Development

No branches or pull requests

3 participants