AlexKnauth / reprovide-lang

a simple racket language for reproviding modules
MIT License
5 stars 0 forks source link

Build error on indirect-glob tests #14

Open 9999years opened 3 years ago

9999years commented 3 years ago

Errors when installing on the racket/racket:8.0-full Docker image:

  Resolving "reprovide-lang" via https://download.racket-lang.org/releases/8.0/catalog/
  Resolving "reprovide-lang" via https://pkg-build.racket-lang.org/server/built/catalog/
  Downloading https://pkg-build.racket-lang.org/server/built/pkgs/reprovide-lang.zip
  Resolving "reprovide-lang-lib" via https://download.racket-lang.org/releases/8.0/catalog/
  Resolving "reprovide-lang-lib" via https://pkg-build.racket-lang.org/server/built/catalog/
  Downloading https://pkg-build.racket-lang.org/server/built/pkgs/reprovide-lang-lib.zip

  ...

  raco setup: 0 making: <pkgs>/reprovide-lang-lib/reprovide
  raco setup: 0 making: <pkgs>/reprovide-lang-lib/reprovide/require-transformer
  raco setup: 0 making: <pkgs>/reprovide-lang-lib/reprovide/require-transformer/private
  raco setup: 0 making: <pkgs>/reprovide-lang/reprovide
  raco setup: 0 making: <pkgs>/reprovide-lang/reprovide/scribblings
  raco setup: 0 making: <pkgs>/reprovide-lang/reprovide/test
  raco setup: 0 making: <pkgs>/reprovide-lang/reprovide/test/example-directory
  raco setup: 0 making: <pkgs>/reprovide-lang/reprovide/test/other-subdir
  open-input-file: cannot open module file
    module path: /home/root/user/.local/share/racket/8.0/pkgs/reprovide-lang/reprovide/test/example-directory/a.rkt
    path: /home/root/user/.local/share/racket/8.0/pkgs/reprovide-lang/reprovide/test/example-directory/a.rkt
    system error: no such file or directory; rkt_err=3
    compilation context...:
     /root/.local/share/racket/8.0/pkgs/reprovide-lang/reprovide/test/other-subdir/indirect-glob-in.rkt
    context...:
     /usr/share/racket/collects/compiler/private/cm-minimal.rkt:608:0: compile-zo*
     /usr/share/racket/collects/compiler/private/cm-minimal.rkt:407:15
     /usr/share/racket/collects/compiler/private/cm-minimal.rkt:396:12: build
     /usr/share/racket/collects/compiler/private/cm-minimal.rkt:372:0: maybe-compile-zo
     /usr/share/racket/collects/compiler/private/cm-minimal.rkt:206:0: compile-root
     /usr/share/racket/collects/compiler/private/cm-minimal.rkt:102:4
     /usr/share/racket/collects/setup/parallel-build.rkt:325:9
     /usr/share/racket/collects/setup/parallel-do.rkt:455:25
     /usr/share/racket/collects/setup/parallel-do.rkt:441:20: loop
AlexKnauth commented 3 years ago

It's compiling reprovide/test/other-subdir/indirect-glob-in.rkt which contains:

#lang racket/base
(require "../use-glob-in.rkt")

This refers to reprovide/test/use-glob-in.rkt which is:

#lang reprovide
(glob-in "example-directory/*.rkt")

The example directory has an a.rkt file in it, but the main difference I notice is in the beginning of the paths.

The path in the compilation context where it's testing starts with /root/.local/share/racket/, while the path its trying/failing to access starts with /home/root/user/.local/share/racket/.

There's an extra home directory at the beginning and an extra user directory in the middle.

I don't know why those would be different yet

AlexKnauth commented 3 years ago

Does this error only happen when trying to install the full reprovide-lang package with tests and docs? Can you avoid it by only attempting to install reprovide-lang-lib?

AlexKnauth commented 2 years ago

With @winny-'s help I was able to reproduce this on the Docker Racket 8.3 version:

$ docker run -ti --rm racket/racket:8.3-full raco pkg install --auto reprovide-lang

Though strangely I did not reproduce the error on the Docker Racket 8.0 version.

Installing / depending-on only reprovide-lang-lib instead of the full reprovide-lang is a workaround for now.

Since I don't know much about how Docker interacts with the filesystem and Racket's compilation, who would know where to look for ways of making glob-in compatible with Docker? Or failing that, where to look for ways of telling raco setup and raco test to disable that indirect-glob-in test only within Docker?