crystal-lang / shards

Dependency manager for the Crystal language
Other
761 stars 98 forks source link

0.12.0 test fail with "unable to auto-detect email address" #430

Open anatol opened 4 years ago

anatol commented 4 years ago

I am building shards with Arch chroot build environment and tests fail for me:

==> Starting check()...
crystal spec ./spec/unit/
crystal spec ./spec/integration/
Unable to create directory: '/build/.cache/crystal/build-shards-src-shards-0.12.0-spec': File exists (File::AlreadyExistsError)
  from ???
  from ???
  from ???
  from ???
  from ???
  from ???
  from ???
  from __crystal_main
  from main
  from __libc_start_main
  from _start
  from ???
Error: you've found a bug in the Crystal compiler. Please open an issue, including source code that will allow us to reproduce the bug: https://github.com/crystal-lang/crystal/issues
make: *** [Makefile:51: test_integration] Error 1
make: *** Waiting for unfinished jobs....
...EEEEEEEE...EEEEEEEEEE...............................................E................

Failures:

  1) Shards::Package installs

       command failed: git commit --allow-empty --no-gpg-sign -m 'release: v0.1.2':  -- 
       *** Please tell me who you are.

       Run

         git config --global user.email "you@example.com"
         git config --global user.name "Your Name"

       to set your account's default identity.
       Omit --global to set the identity only in this repository.

       fatal: unable to auto-detect email address (got 'builduser@anatol.(none)')
        (FailedCommand)
         from spec/support/factories.cr:150:5 in 'run'
         from spec/support/factories.cr:67:5 in 'create_git_commit'
         from spec/support/factories.cr:49:5 in 'create_git_version_commit'
         from spec/support/factories.cr:54:3 in 'create_git_release'
         from spec/support/factories.cr:28:29 in 'create_git_repository'
         from spec/unit/package_spec.cr:16:7 in '->'
         from ../../../../usr/lib/crystal/primitives.cr:255:3 in 'run_before_each_hooks'
         from ../../../../usr/lib/crystal/spec/context.cr:339:7 in 'run_before_each_hooks'
         from ../../../../usr/lib/crystal/spec/example.cr:44:7 in 'internal_run'
         from ../../../../usr/lib/crystal/spec/example.cr:33:16 in 'run'
         from ../../../../usr/lib/crystal/spec/context.cr:18:23 in 'internal_run'
         from ../../../../usr/lib/crystal/spec/context.cr:330:7 in 'run'
         from ../../../../usr/lib/crystal/spec/context.cr:18:23 in 'internal_run'
         from ../../../../usr/lib/crystal/spec/context.cr:147:7 in 'run'
         from ../../../../usr/lib/crystal/spec/dsl.cr:270:7 in '->'
         from ../../../../usr/lib/crystal/primitives.cr:255:3 in 'run'
         from ../../../../usr/lib/crystal/crystal/main.cr:45:14 in 'main'
         from ../../../../usr/lib/crystal/crystal/main.cr:114:3 in 'main'
         from __libc_start_main
         from _start
         from ???

  2) Shards::Package reads spec from installed dir

       command failed: git commit --allow-empty --no-gpg-sign -m 'release: v0.1.2':  -- 
       *** Please tell me who you are.

       Run

         git config --global user.email "you@example.com"
         git config --global user.name "Your Name"

       to set your account's default identity.
       Omit --global to set the identity only in this repository.

       fatal: unable to auto-detect email address (got 'builduser@anatol.(none)')
        (FailedCommand)
         from spec/support/factories.cr:150:5 in 'run'
         from spec/support/factories.cr:67:5 in 'create_git_commit'
         from spec/support/factories.cr:49:5 in 'create_git_version_commit'
         from spec/support/factories.cr:54:3 in 'create_git_release'
         from spec/support/factories.cr:28:29 in 'create_git_repository'
         from spec/unit/package_spec.cr:16:7 in '->'
         from ../../../../usr/lib/crystal/primitives.cr:255:3 in 'run_before_each_hooks'
         from ../../../../usr/lib/crystal/spec/context.cr:339:7 in 'run_before_each_hooks'
         from ../../../../usr/lib/crystal/spec/example.cr:44:7 in 'internal_run'
         from ../../../../usr/lib/crystal/spec/example.cr:33:16 in 'run'
         from ../../../../usr/lib/crystal/spec/context.cr:18:23 in 'internal_run'
         from ../../../../usr/lib/crystal/spec/context.cr:330:7 in 'run'
         from ../../../../usr/lib/crystal/spec/context.cr:18:23 in 'internal_run'
         from ../../../../usr/lib/crystal/spec/context.cr:147:7 in 'run'
         from ../../../../usr/lib/crystal/spec/dsl.cr:270:7 in '->'
         from ../../../../usr/lib/crystal/primitives.cr:255:3 in 'run'
         from ../../../../usr/lib/crystal/crystal/main.cr:45:14 in 'main'
         from ../../../../usr/lib/crystal/crystal/main.cr:114:3 in 'main'
         from __libc_start_main
         from _start
         from ???

  3) Shards::Package fallback to resolver to read spec

       command failed: git commit --allow-empty --no-gpg-sign -m 'release: v0.1.2':  -- 
       *** Please tell me who you are.

       Run

         git config --global user.email "you@example.com"
         git config --global user.name "Your Name"

       to set your account's default identity.
       Omit --global to set the identity only in this repository.

       fatal: unable to auto-detect email address (got 'builduser@anatol.(none)')
        (FailedCommand)
         from spec/support/factories.cr:150:5 in 'run'
         from spec/support/factories.cr:67:5 in 'create_git_commit'
         from spec/support/factories.cr:49:5 in 'create_git_version_commit'
         from spec/support/factories.cr:54:3 in 'create_git_release'
         from spec/support/factories.cr:28:29 in 'create_git_repository'
         from spec/unit/package_spec.cr:16:7 in '->'
         from ../../../../usr/lib/crystal/primitives.cr:255:3 in 'run_before_each_hooks'
         from ../../../../usr/lib/crystal/spec/context.cr:339:7 in 'run_before_each_hooks'
         from ../../../../usr/lib/crystal/spec/example.cr:44:7 in 'internal_run'
         from ../../../../usr/lib/crystal/spec/example.cr:33:16 in 'run'
         from ../../../../usr/lib/crystal/spec/context.cr:18:23 in 'internal_run'
         from ../../../../usr/lib/crystal/spec/context.cr:330:7 in 'run'
         from ../../../../usr/lib/crystal/spec/context.cr:18:23 in 'internal_run'
         from ../../../../usr/lib/crystal/spec/context.cr:147:7 in 'run'
         from ../../../../usr/lib/crystal/spec/dsl.cr:270:7 in '->'
         from ../../../../usr/lib/crystal/primitives.cr:255:3 in 'run'
         from ../../../../usr/lib/crystal/crystal/main.cr:45:14 in 'main'
         from ../../../../usr/lib/crystal/crystal/main.cr:114:3 in 'main'
         from __libc_start_main
         from _start
         from ???

  4) Shards::Package reads spec from resolver if not installed

       command failed: git commit --allow-empty --no-gpg-sign -m 'release: v0.1.2':  -- 
       *** Please tell me who you are.

       Run

         git config --global user.email "you@example.com"
         git config --global user.name "Your Name"

       to set your account's default identity.
       Omit --global to set the identity only in this repository.

       fatal: unable to auto-detect email address (got 'builduser@anatol.(none)')
        (FailedCommand)
         from spec/support/factories.cr:150:5 in 'run'
         from spec/support/factories.cr:67:5 in 'create_git_commit'
         from spec/support/factories.cr:49:5 in 'create_git_version_commit'
         from spec/support/factories.cr:54:3 in 'create_git_release'
         from spec/support/factories.cr:28:29 in 'create_git_repository'
         from spec/unit/package_spec.cr:16:7 in '->'
         from ../../../../usr/lib/crystal/primitives.cr:255:3 in 'run_before_each_hooks'
         from ../../../../usr/lib/crystal/spec/context.cr:339:7 in 'run_before_each_hooks'
         from ../../../../usr/lib/crystal/spec/example.cr:44:7 in 'internal_run'
         from ../../../../usr/lib/crystal/spec/example.cr:33:16 in 'run'
         from ../../../../usr/lib/crystal/spec/context.cr:18:23 in 'internal_run'
         from ../../../../usr/lib/crystal/spec/context.cr:330:7 in 'run'
         from ../../../../usr/lib/crystal/spec/context.cr:18:23 in 'internal_run'
         from ../../../../usr/lib/crystal/spec/context.cr:147:7 in 'run'
         from ../../../../usr/lib/crystal/spec/dsl.cr:270:7 in '->'
         from ../../../../usr/lib/crystal/primitives.cr:255:3 in 'run'
         from ../../../../usr/lib/crystal/crystal/main.cr:45:14 in 'main'
         from ../../../../usr/lib/crystal/crystal/main.cr:114:3 in 'main'
         from __libc_start_main
         from _start
         from ???

  5) Shards::Package different version is not installed

       command failed: git commit --allow-empty --no-gpg-sign -m 'release: v0.1.2':  -- 
       *** Please tell me who you are.

       Run

         git config --global user.email "you@example.com"
         git config --global user.name "Your Name"

       to set your account's default identity.
       Omit --global to set the identity only in this repository.

       fatal: unable to auto-detect email address (got 'builduser@anatol.(none)')
        (FailedCommand)
         from spec/support/factories.cr:150:5 in 'run'
         from spec/support/factories.cr:67:5 in 'create_git_commit'
         from spec/support/factories.cr:49:5 in 'create_git_version_commit'
         from spec/support/factories.cr:54:3 in 'create_git_release'
         from spec/support/factories.cr:28:29 in 'create_git_repository'
         from spec/unit/package_spec.cr:16:7 in '->'
         from ../../../../usr/lib/crystal/primitives.cr:255:3 in 'run_before_each_hooks'
         from ../../../../usr/lib/crystal/spec/context.cr:339:7 in 'run_before_each_hooks'
         from ../../../../usr/lib/crystal/spec/example.cr:44:7 in 'internal_run'
         from ../../../../usr/lib/crystal/spec/example.cr:33:16 in 'run'
         from ../../../../usr/lib/crystal/spec/context.cr:18:23 in 'internal_run'
         from ../../../../usr/lib/crystal/spec/context.cr:330:7 in 'run'
         from ../../../../usr/lib/crystal/spec/context.cr:18:23 in 'internal_run'
         from ../../../../usr/lib/crystal/spec/context.cr:147:7 in 'run'
         from ../../../../usr/lib/crystal/spec/dsl.cr:270:7 in '->'
         from ../../../../usr/lib/crystal/primitives.cr:255:3 in 'run'
         from ../../../../usr/lib/crystal/crystal/main.cr:45:14 in 'main'
         from ../../../../usr/lib/crystal/crystal/main.cr:114:3 in 'main'
         from __libc_start_main
         from _start
         from ???

  6) Shards::Package different resolver is not installed

       command failed: git commit --allow-empty --no-gpg-sign -m 'release: v0.1.2':  -- 
       *** Please tell me who you are.

       Run

         git config --global user.email "you@example.com"
         git config --global user.name "Your Name"

       to set your account's default identity.
       Omit --global to set the identity only in this repository.

       fatal: unable to auto-detect email address (got 'builduser@anatol.(none)')
        (FailedCommand)
         from spec/support/factories.cr:150:5 in 'run'
         from spec/support/factories.cr:67:5 in 'create_git_commit'
         from spec/support/factories.cr:49:5 in 'create_git_version_commit'
         from spec/support/factories.cr:54:3 in 'create_git_release'
         from spec/support/factories.cr:28:29 in 'create_git_repository'
         from spec/unit/package_spec.cr:16:7 in '->'
         from ../../../../usr/lib/crystal/primitives.cr:255:3 in 'run_before_each_hooks'
         from ../../../../usr/lib/crystal/spec/context.cr:339:7 in 'run_before_each_hooks'
         from ../../../../usr/lib/crystal/spec/example.cr:44:7 in 'internal_run'
         from ../../../../usr/lib/crystal/spec/example.cr:33:16 in 'run'
         from ../../../../usr/lib/crystal/spec/context.cr:18:23 in 'internal_run'
         from ../../../../usr/lib/crystal/spec/context.cr:330:7 in 'run'
         from ../../../../usr/lib/crystal/spec/context.cr:18:23 in 'internal_run'
         from ../../../../usr/lib/crystal/spec/context.cr:147:7 in 'run'
         from ../../../../usr/lib/crystal/spec/dsl.cr:270:7 in '->'
         from ../../../../usr/lib/crystal/primitives.cr:255:3 in 'run'
         from ../../../../usr/lib/crystal/crystal/main.cr:45:14 in 'main'
         from ../../../../usr/lib/crystal/crystal/main.cr:114:3 in 'main'
         from __libc_start_main
         from _start
         from ???

  7) Shards::Package not installed if missing target

       command failed: git commit --allow-empty --no-gpg-sign -m 'release: v0.1.2':  -- 
       *** Please tell me who you are.

       Run

         git config --global user.email "you@example.com"
         git config --global user.name "Your Name"

       to set your account's default identity.
       Omit --global to set the identity only in this repository.

       fatal: unable to auto-detect email address (got 'builduser@anatol.(none)')
        (FailedCommand)
         from spec/support/factories.cr:150:5 in 'run'
         from spec/support/factories.cr:67:5 in 'create_git_commit'
         from spec/support/factories.cr:49:5 in 'create_git_version_commit'
         from spec/support/factories.cr:54:3 in 'create_git_release'
         from spec/support/factories.cr:28:29 in 'create_git_repository'
         from spec/unit/package_spec.cr:16:7 in '->'
         from ../../../../usr/lib/crystal/primitives.cr:255:3 in 'run_before_each_hooks'
         from ../../../../usr/lib/crystal/spec/context.cr:339:7 in 'run_before_each_hooks'
         from ../../../../usr/lib/crystal/spec/example.cr:44:7 in 'internal_run'
         from ../../../../usr/lib/crystal/spec/example.cr:33:16 in 'run'
         from ../../../../usr/lib/crystal/spec/context.cr:18:23 in 'internal_run'
         from ../../../../usr/lib/crystal/spec/context.cr:330:7 in 'run'
         from ../../../../usr/lib/crystal/spec/context.cr:18:23 in 'internal_run'
         from ../../../../usr/lib/crystal/spec/context.cr:147:7 in 'run'
         from ../../../../usr/lib/crystal/spec/dsl.cr:270:7 in '->'
         from ../../../../usr/lib/crystal/primitives.cr:255:3 in 'run'
         from ../../../../usr/lib/crystal/crystal/main.cr:45:14 in 'main'
         from ../../../../usr/lib/crystal/crystal/main.cr:114:3 in 'main'
         from __libc_start_main
         from _start
         from ???

  8) Shards::Package cleanups target before installing

       command failed: git commit --allow-empty --no-gpg-sign -m 'release: v0.1.2':  -- 
       *** Please tell me who you are.

       Run

         git config --global user.email "you@example.com"
         git config --global user.name "Your Name"

       to set your account's default identity.
       Omit --global to set the identity only in this repository.

       fatal: unable to auto-detect email address (got 'builduser@anatol.(none)')
        (FailedCommand)
         from spec/support/factories.cr:150:5 in 'run'
         from spec/support/factories.cr:67:5 in 'create_git_commit'
         from spec/support/factories.cr:49:5 in 'create_git_version_commit'
         from spec/support/factories.cr:54:3 in 'create_git_release'
         from spec/support/factories.cr:28:29 in 'create_git_repository'
         from spec/unit/package_spec.cr:16:7 in '->'
         from ../../../../usr/lib/crystal/primitives.cr:255:3 in 'run_before_each_hooks'
         from ../../../../usr/lib/crystal/spec/context.cr:339:7 in 'run_before_each_hooks'
         from ../../../../usr/lib/crystal/spec/example.cr:44:7 in 'internal_run'
         from ../../../../usr/lib/crystal/spec/example.cr:33:16 in 'run'
         from ../../../../usr/lib/crystal/spec/context.cr:18:23 in 'internal_run'
         from ../../../../usr/lib/crystal/spec/context.cr:330:7 in 'run'
         from ../../../../usr/lib/crystal/spec/context.cr:18:23 in 'internal_run'
         from ../../../../usr/lib/crystal/spec/context.cr:147:7 in 'run'
         from ../../../../usr/lib/crystal/spec/dsl.cr:270:7 in '->'
         from ../../../../usr/lib/crystal/primitives.cr:255:3 in 'run'
         from ../../../../usr/lib/crystal/crystal/main.cr:45:14 in 'main'
         from ../../../../usr/lib/crystal/crystal/main.cr:114:3 in 'main'
         from __libc_start_main
         from _start
         from ???

  9) Shards::GitResolver available releases

       command failed: git commit --allow-empty --no-gpg-sign -m 'initial release':  -- 
       *** Please tell me who you are.

       Run

         git config --global user.email "you@example.com"
         git config --global user.name "Your Name"

       to set your account's default identity.
       Omit --global to set the identity only in this repository.

       fatal: unable to auto-detect email address (got 'builduser@anatol.(none)')
        (FailedCommand)
         from spec/support/factories.cr:150:5 in 'run'
         from spec/support/factories.cr:67:5 in 'create_git_commit'
         from spec/unit/git_resolver_spec.cr:17:7 in '->'
         from ../../../../usr/lib/crystal/primitives.cr:255:3 in 'run_before_each_hooks'
         from ../../../../usr/lib/crystal/spec/context.cr:339:7 in 'run_before_each_hooks'
         from ../../../../usr/lib/crystal/spec/example.cr:44:7 in 'internal_run'
         from ../../../../usr/lib/crystal/spec/example.cr:33:16 in 'run'
         from ../../../../usr/lib/crystal/spec/context.cr:18:23 in 'internal_run'
         from ../../../../usr/lib/crystal/spec/context.cr:330:7 in 'run'
         from ../../../../usr/lib/crystal/spec/context.cr:18:23 in 'internal_run'
         from ../../../../usr/lib/crystal/spec/context.cr:147:7 in 'run'
         from ../../../../usr/lib/crystal/spec/dsl.cr:270:7 in '->'
         from ../../../../usr/lib/crystal/primitives.cr:255:3 in 'run'
         from ../../../../usr/lib/crystal/crystal/main.cr:45:14 in 'main'
         from ../../../../usr/lib/crystal/crystal/main.cr:114:3 in 'main'
         from __libc_start_main
         from _start
         from ???

 10) Shards::GitResolver latest version for ref

       command failed: git commit --allow-empty --no-gpg-sign -m 'initial release':  -- 
       *** Please tell me who you are.

       Run

         git config --global user.email "you@example.com"
         git config --global user.name "Your Name"

       to set your account's default identity.
       Omit --global to set the identity only in this repository.

       fatal: unable to auto-detect email address (got 'builduser@anatol.(none)')
        (FailedCommand)
         from spec/support/factories.cr:150:5 in 'run'
         from spec/support/factories.cr:67:5 in 'create_git_commit'
         from spec/unit/git_resolver_spec.cr:17:7 in '->'
         from ../../../../usr/lib/crystal/primitives.cr:255:3 in 'run_before_each_hooks'
         from ../../../../usr/lib/crystal/spec/context.cr:339:7 in 'run_before_each_hooks'
         from ../../../../usr/lib/crystal/spec/example.cr:44:7 in 'internal_run'
         from ../../../../usr/lib/crystal/spec/example.cr:33:16 in 'run'
         from ../../../../usr/lib/crystal/spec/context.cr:18:23 in 'internal_run'
         from ../../../../usr/lib/crystal/spec/context.cr:330:7 in 'run'
         from ../../../../usr/lib/crystal/spec/context.cr:18:23 in 'internal_run'
         from ../../../../usr/lib/crystal/spec/context.cr:147:7 in 'run'
         from ../../../../usr/lib/crystal/spec/dsl.cr:270:7 in '->'
         from ../../../../usr/lib/crystal/primitives.cr:255:3 in 'run'
         from ../../../../usr/lib/crystal/crystal/main.cr:45:14 in 'main'
         from ../../../../usr/lib/crystal/crystal/main.cr:114:3 in 'main'
         from __libc_start_main
         from _start
         from ???

 11) Shards::GitResolver versions for

       command failed: git commit --allow-empty --no-gpg-sign -m 'initial release':  -- 
       *** Please tell me who you are.

       Run

         git config --global user.email "you@example.com"
         git config --global user.name "Your Name"

       to set your account's default identity.
       Omit --global to set the identity only in this repository.

       fatal: unable to auto-detect email address (got 'builduser@anatol.(none)')
        (FailedCommand)
         from spec/support/factories.cr:150:5 in 'run'
         from spec/support/factories.cr:67:5 in 'create_git_commit'
         from spec/unit/git_resolver_spec.cr:17:7 in '->'
         from ../../../../usr/lib/crystal/primitives.cr:255:3 in 'run_before_each_hooks'
         from ../../../../usr/lib/crystal/spec/context.cr:339:7 in 'run_before_each_hooks'
         from ../../../../usr/lib/crystal/spec/example.cr:44:7 in 'internal_run'
         from ../../../../usr/lib/crystal/spec/example.cr:33:16 in 'run'
         from ../../../../usr/lib/crystal/spec/context.cr:18:23 in 'internal_run'
         from ../../../../usr/lib/crystal/spec/context.cr:330:7 in 'run'
         from ../../../../usr/lib/crystal/spec/context.cr:18:23 in 'internal_run'
         from ../../../../usr/lib/crystal/spec/context.cr:147:7 in 'run'
         from ../../../../usr/lib/crystal/spec/dsl.cr:270:7 in '->'
         from ../../../../usr/lib/crystal/primitives.cr:255:3 in 'run'
         from ../../../../usr/lib/crystal/crystal/main.cr:45:14 in 'main'
         from ../../../../usr/lib/crystal/crystal/main.cr:114:3 in 'main'
         from __libc_start_main
         from _start
         from ???

 12) Shards::GitResolver read spec for release

       command failed: git commit --allow-empty --no-gpg-sign -m 'initial release':  -- 
       *** Please tell me who you are.

       Run

         git config --global user.email "you@example.com"
         git config --global user.name "Your Name"

       to set your account's default identity.
       Omit --global to set the identity only in this repository.

       fatal: unable to auto-detect email address (got 'builduser@anatol.(none)')
        (FailedCommand)
         from spec/support/factories.cr:150:5 in 'run'
         from spec/support/factories.cr:67:5 in 'create_git_commit'
         from spec/unit/git_resolver_spec.cr:17:7 in '->'
         from ../../../../usr/lib/crystal/primitives.cr:255:3 in 'run_before_each_hooks'
         from ../../../../usr/lib/crystal/spec/context.cr:339:7 in 'run_before_each_hooks'
         from ../../../../usr/lib/crystal/spec/example.cr:44:7 in 'internal_run'
         from ../../../../usr/lib/crystal/spec/example.cr:33:16 in 'run'
         from ../../../../usr/lib/crystal/spec/context.cr:18:23 in 'internal_run'
         from ../../../../usr/lib/crystal/spec/context.cr:330:7 in 'run'
         from ../../../../usr/lib/crystal/spec/context.cr:18:23 in 'internal_run'
         from ../../../../usr/lib/crystal/spec/context.cr:147:7 in 'run'
         from ../../../../usr/lib/crystal/spec/dsl.cr:270:7 in '->'
         from ../../../../usr/lib/crystal/primitives.cr:255:3 in 'run'
         from ../../../../usr/lib/crystal/crystal/main.cr:45:14 in 'main'
         from ../../../../usr/lib/crystal/crystal/main.cr:114:3 in 'main'
         from __libc_start_main
         from _start
         from ???

 13) Shards::GitResolver read spec for commit

       command failed: git commit --allow-empty --no-gpg-sign -m 'initial release':  -- 
       *** Please tell me who you are.

       Run

         git config --global user.email "you@example.com"
         git config --global user.name "Your Name"

       to set your account's default identity.
       Omit --global to set the identity only in this repository.

       fatal: unable to auto-detect email address (got 'builduser@anatol.(none)')
        (FailedCommand)
         from spec/support/factories.cr:150:5 in 'run'
         from spec/support/factories.cr:67:5 in 'create_git_commit'
         from spec/unit/git_resolver_spec.cr:17:7 in '->'
         from ../../../../usr/lib/crystal/primitives.cr:255:3 in 'run_before_each_hooks'
         from ../../../../usr/lib/crystal/spec/context.cr:339:7 in 'run_before_each_hooks'
         from ../../../../usr/lib/crystal/spec/example.cr:44:7 in 'internal_run'
         from ../../../../usr/lib/crystal/spec/example.cr:33:16 in 'run'
         from ../../../../usr/lib/crystal/spec/context.cr:18:23 in 'internal_run'
         from ../../../../usr/lib/crystal/spec/context.cr:330:7 in 'run'
         from ../../../../usr/lib/crystal/spec/context.cr:18:23 in 'internal_run'
         from ../../../../usr/lib/crystal/spec/context.cr:147:7 in 'run'
         from ../../../../usr/lib/crystal/spec/dsl.cr:270:7 in '->'
         from ../../../../usr/lib/crystal/primitives.cr:255:3 in 'run'
         from ../../../../usr/lib/crystal/crystal/main.cr:45:14 in 'main'
         from ../../../../usr/lib/crystal/crystal/main.cr:114:3 in 'main'
         from __libc_start_main
         from _start
         from ???

 14) Shards::GitResolver install

       command failed: git commit --allow-empty --no-gpg-sign -m 'initial release':  -- 
       *** Please tell me who you are.

       Run

         git config --global user.email "you@example.com"
         git config --global user.name "Your Name"

       to set your account's default identity.
       Omit --global to set the identity only in this repository.

       fatal: unable to auto-detect email address (got 'builduser@anatol.(none)')
        (FailedCommand)
         from spec/support/factories.cr:150:5 in 'run'
         from spec/support/factories.cr:67:5 in 'create_git_commit'
         from spec/unit/git_resolver_spec.cr:17:7 in '->'
         from ../../../../usr/lib/crystal/primitives.cr:255:3 in 'run_before_each_hooks'
         from ../../../../usr/lib/crystal/spec/context.cr:339:7 in 'run_before_each_hooks'
         from ../../../../usr/lib/crystal/spec/example.cr:44:7 in 'internal_run'
         from ../../../../usr/lib/crystal/spec/example.cr:33:16 in 'run'
         from ../../../../usr/lib/crystal/spec/context.cr:18:23 in 'internal_run'
         from ../../../../usr/lib/crystal/spec/context.cr:330:7 in 'run'
         from ../../../../usr/lib/crystal/spec/context.cr:18:23 in 'internal_run'
         from ../../../../usr/lib/crystal/spec/context.cr:147:7 in 'run'
         from ../../../../usr/lib/crystal/spec/dsl.cr:270:7 in '->'
         from ../../../../usr/lib/crystal/primitives.cr:255:3 in 'run'
         from ../../../../usr/lib/crystal/crystal/main.cr:45:14 in 'main'
         from ../../../../usr/lib/crystal/crystal/main.cr:114:3 in 'main'
         from __libc_start_main
         from _start
         from ???

 15) Shards::GitResolver install commit

       command failed: git commit --allow-empty --no-gpg-sign -m 'initial release':  -- 
       *** Please tell me who you are.

       Run

         git config --global user.email "you@example.com"
         git config --global user.name "Your Name"

       to set your account's default identity.
       Omit --global to set the identity only in this repository.

       fatal: unable to auto-detect email address (got 'builduser@anatol.(none)')
        (FailedCommand)
         from spec/support/factories.cr:150:5 in 'run'
         from spec/support/factories.cr:67:5 in 'create_git_commit'
         from spec/unit/git_resolver_spec.cr:17:7 in '->'
         from ../../../../usr/lib/crystal/primitives.cr:255:3 in 'run_before_each_hooks'
         from ../../../../usr/lib/crystal/spec/context.cr:339:7 in 'run_before_each_hooks'
         from ../../../../usr/lib/crystal/spec/example.cr:44:7 in 'internal_run'
         from ../../../../usr/lib/crystal/spec/example.cr:33:16 in 'run'
         from ../../../../usr/lib/crystal/spec/context.cr:18:23 in 'internal_run'
         from ../../../../usr/lib/crystal/spec/context.cr:330:7 in 'run'
         from ../../../../usr/lib/crystal/spec/context.cr:18:23 in 'internal_run'
         from ../../../../usr/lib/crystal/spec/context.cr:147:7 in 'run'
         from ../../../../usr/lib/crystal/spec/dsl.cr:270:7 in '->'
         from ../../../../usr/lib/crystal/primitives.cr:255:3 in 'run'
         from ../../../../usr/lib/crystal/crystal/main.cr:45:14 in 'main'
         from ../../../../usr/lib/crystal/crystal/main.cr:114:3 in 'main'
         from __libc_start_main
         from _start
         from ???

 16) Shards::GitResolver origin changed

       command failed: git commit --allow-empty --no-gpg-sign -m 'initial release':  -- 
       *** Please tell me who you are.

       Run

         git config --global user.email "you@example.com"
         git config --global user.name "Your Name"

       to set your account's default identity.
       Omit --global to set the identity only in this repository.

       fatal: unable to auto-detect email address (got 'builduser@anatol.(none)')
        (FailedCommand)
         from spec/support/factories.cr:150:5 in 'run'
         from spec/support/factories.cr:67:5 in 'create_git_commit'
         from spec/unit/git_resolver_spec.cr:17:7 in '->'
         from ../../../../usr/lib/crystal/primitives.cr:255:3 in 'run_before_each_hooks'
         from ../../../../usr/lib/crystal/spec/context.cr:339:7 in 'run_before_each_hooks'
         from ../../../../usr/lib/crystal/spec/example.cr:44:7 in 'internal_run'
         from ../../../../usr/lib/crystal/spec/example.cr:33:16 in 'run'
         from ../../../../usr/lib/crystal/spec/context.cr:18:23 in 'internal_run'
         from ../../../../usr/lib/crystal/spec/context.cr:330:7 in 'run'
         from ../../../../usr/lib/crystal/spec/context.cr:18:23 in 'internal_run'
         from ../../../../usr/lib/crystal/spec/context.cr:147:7 in 'run'
         from ../../../../usr/lib/crystal/spec/dsl.cr:270:7 in '->'
         from ../../../../usr/lib/crystal/primitives.cr:255:3 in 'run'
         from ../../../../usr/lib/crystal/crystal/main.cr:45:14 in 'main'
         from ../../../../usr/lib/crystal/crystal/main.cr:114:3 in 'main'
         from __libc_start_main
         from _start
         from ???

 17) Shards::GitResolver renders report version

       command failed: git commit --allow-empty --no-gpg-sign -m 'initial release':  -- 
       *** Please tell me who you are.

       Run

         git config --global user.email "you@example.com"
         git config --global user.name "Your Name"

       to set your account's default identity.
       Omit --global to set the identity only in this repository.

       fatal: unable to auto-detect email address (got 'builduser@anatol.(none)')
        (FailedCommand)
         from spec/support/factories.cr:150:5 in 'run'
         from spec/support/factories.cr:67:5 in 'create_git_commit'
         from spec/unit/git_resolver_spec.cr:17:7 in '->'
         from ../../../../usr/lib/crystal/primitives.cr:255:3 in 'run_before_each_hooks'
         from ../../../../usr/lib/crystal/spec/context.cr:339:7 in 'run_before_each_hooks'
         from ../../../../usr/lib/crystal/spec/example.cr:44:7 in 'internal_run'
         from ../../../../usr/lib/crystal/spec/example.cr:33:16 in 'run'
         from ../../../../usr/lib/crystal/spec/context.cr:18:23 in 'internal_run'
         from ../../../../usr/lib/crystal/spec/context.cr:330:7 in 'run'
         from ../../../../usr/lib/crystal/spec/context.cr:18:23 in 'internal_run'
         from ../../../../usr/lib/crystal/spec/context.cr:147:7 in 'run'
         from ../../../../usr/lib/crystal/spec/dsl.cr:270:7 in '->'
         from ../../../../usr/lib/crystal/primitives.cr:255:3 in 'run'
         from ../../../../usr/lib/crystal/crystal/main.cr:45:14 in 'main'
         from ../../../../usr/lib/crystal/crystal/main.cr:114:3 in 'main'
         from __libc_start_main
         from _start
         from ???

 18) Shards::GitResolver #matches_ref

       command failed: git commit --allow-empty --no-gpg-sign -m 'initial release':  -- 
       *** Please tell me who you are.

       Run

         git config --global user.email "you@example.com"
         git config --global user.name "Your Name"

       to set your account's default identity.
       Omit --global to set the identity only in this repository.

       fatal: unable to auto-detect email address (got 'builduser@anatol.(none)')
        (FailedCommand)
         from spec/support/factories.cr:150:5 in 'run'
         from spec/support/factories.cr:67:5 in 'create_git_commit'
         from spec/unit/git_resolver_spec.cr:17:7 in '->'
         from ../../../../usr/lib/crystal/primitives.cr:255:3 in 'run_before_each_hooks'
         from ../../../../usr/lib/crystal/spec/context.cr:339:7 in 'run_before_each_hooks'
         from ../../../../usr/lib/crystal/spec/example.cr:44:7 in 'internal_run'
         from ../../../../usr/lib/crystal/spec/example.cr:33:16 in 'run'
         from ../../../../usr/lib/crystal/spec/context.cr:18:23 in 'internal_run'
         from ../../../../usr/lib/crystal/spec/context.cr:330:7 in 'run'
         from ../../../../usr/lib/crystal/spec/context.cr:18:23 in 'internal_run'
         from ../../../../usr/lib/crystal/spec/context.cr:147:7 in 'run'
         from ../../../../usr/lib/crystal/spec/dsl.cr:270:7 in '->'
         from ../../../../usr/lib/crystal/primitives.cr:255:3 in 'run'
         from ../../../../usr/lib/crystal/crystal/main.cr:45:14 in 'main'
         from ../../../../usr/lib/crystal/crystal/main.cr:114:3 in 'main'
         from __libc_start_main
         from _start
         from ???

 19) Shards::Lock parses

       command failed: git commit --allow-empty --no-gpg-sign -m 'release: v0.1.0':  -- 
       *** Please tell me who you are.

       Run

         git config --global user.email "you@example.com"
         git config --global user.name "Your Name"

       to set your account's default identity.
       Omit --global to set the identity only in this repository.

       fatal: unable to auto-detect email address (got 'builduser@anatol.(none)')
        (FailedCommand)
         from spec/support/factories.cr:150:5 in 'run'
         from spec/support/factories.cr:67:5 in 'create_git_commit'
         from spec/support/factories.cr:49:5 in 'create_git_version_commit'
         from spec/support/factories.cr:54:3 in 'create_git_release'
         from spec/support/factories.cr:28:29 in 'create_git_repository'
         from spec/unit/lock_spec.cr:7:7 in '->'
         from ../../../../usr/lib/crystal/primitives.cr:255:3 in 'internal_run'
         from ../../../../usr/lib/crystal/spec/example.cr:33:16 in 'run'
         from ../../../../usr/lib/crystal/spec/context.cr:18:23 in 'internal_run'
         from ../../../../usr/lib/crystal/spec/context.cr:330:7 in 'run'
         from ../../../../usr/lib/crystal/spec/context.cr:18:23 in 'internal_run'
         from ../../../../usr/lib/crystal/spec/context.cr:147:7 in 'run'
         from ../../../../usr/lib/crystal/spec/dsl.cr:270:7 in '->'
         from ../../../../usr/lib/crystal/primitives.cr:255:3 in 'run'
         from ../../../../usr/lib/crystal/crystal/main.cr:45:14 in 'main'
         from ../../../../usr/lib/crystal/crystal/main.cr:114:3 in 'main'
         from __libc_start_main
         from _start
         from ???

Finished in 1.09 seconds
88 examples, 0 failures, 19 errors, 0 pending

Failed examples:

crystal spec spec/unit/package_spec.cr:19 # Shards::Package installs
crystal spec spec/unit/package_spec.cr:26 # Shards::Package reads spec from installed dir
crystal spec spec/unit/package_spec.cr:37 # Shards::Package fallback to resolver to read spec
crystal spec spec/unit/package_spec.cr:44 # Shards::Package reads spec from resolver if not installed
crystal spec spec/unit/package_spec.cr:52 # Shards::Package different version is not installed
crystal spec spec/unit/package_spec.cr:60 # Shards::Package different resolver is not installed
crystal spec spec/unit/package_spec.cr:68 # Shards::Package not installed if missing target
crystal spec spec/unit/package_spec.cr:76 # Shards::Package cleanups target before installing
crystal spec spec/unit/git_resolver_spec.cr:31 # Shards::GitResolver available releases
crystal spec spec/unit/git_resolver_spec.cr:36 # Shards::GitResolver latest version for ref
crystal spec spec/unit/git_resolver_spec.cr:53 # Shards::GitResolver versions for
crystal spec spec/unit/git_resolver_spec.cr:64 # Shards::GitResolver read spec for release
crystal spec spec/unit/git_resolver_spec.cr:70 # Shards::GitResolver read spec for commit
crystal spec spec/unit/git_resolver_spec.cr:77 # Shards::GitResolver install
crystal spec spec/unit/git_resolver_spec.cr:89 # Shards::GitResolver install commit
crystal spec spec/unit/git_resolver_spec.cr:96 # Shards::GitResolver origin changed
crystal spec spec/unit/git_resolver_spec.cr:140 # Shards::GitResolver renders report version
crystal spec spec/unit/git_resolver_spec.cr:145 # Shards::GitResolver #matches_ref
crystal spec spec/unit/lock_spec.cr:6 # Shards::Lock parses
make: *** [Makefile:48: test_unit] Error 1
anatol commented 4 years ago

Shards version is 0.12.0 and here is how I run the tests:

CRYSTAL_OPTS="--release" make
make test
bcardiff commented 4 years ago

We configure all our test environments to use

git config --global user.email "you@example.com"
git config --global user.name "Your Name"
git config --global column.ui always

In https://github.com/crystal-lang/crystal/pull/9640 a more resilient approach was used to set up the git config file. If that's the reason of the failure I guess we could go that way.

Please, confirm if the issue is only a miss configuration of git.

anatol commented 4 years ago

Arch Linux builds production packages in a sanitized chroot environment. That chroot environment has default git settings (i.e. no user.email/user.name). If shards tests require special config option it makes sense to setup the testing environment automatically (in the test code itself) before running the tests.

anatol commented 3 years ago

And even if I set the git config options from https://github.com/crystal-lang/shards/issues/430#issuecomment-670099759 tests still fail with:

crystal spec ./spec/unit/
crystal spec ./spec/integration/
Unable to create directory: '/build/.cache/crystal/build-shards-src-shards-0.12.0-spec': File exists (File::AlreadyExistsError)
  from ???
  from ???
  from ???
  from ???
  from ???
  from ???
  from ???
  from __crystal_main
  from main
  from __libc_start_main
  from _start
  from ???
Error: you've found a bug in the Crystal compiler. Please open an issue, including source code that will allow us to reproduce the bug: https://github.com/crystal-lang/crystal/issues
make: *** [Makefile:48: test_unit] Error 1
make: *** Waiting for unfinished jobs....
...................................................*..........................................................................................................

Pending:
  install updates locked commit when switching between branches (if locked commit is not reachable)

Finished in 31.57 seconds
158 examples, 0 failures, 0 errors, 1 pending