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

etlas doesn't find custom build tool (alex) in windows when building a package #105

Open
jneira opened this issue Jul 31, 2019 · 0 comments

Comments

@jneira
Copy link
Collaborator

jneira commented Jul 31, 2019

  • Bug discovered trying to patch a package that uses alex: Patched microaeson-0.1.0.0 eta-hackage#149
  • eta needs a custom version of alex that doesn't add c headers when generate the .hs file from the template .x
  • so there is a patched version in eta-hackage suitable for eta
  • etlas builds the package with eta and generate the wrapper scripts in the store (alex in nix and alex.cmd in windows)
  • then you can run it with etlas run alex -- --version cause it is aware of windows specific script name
  • but when you tries to build the package etlas is not able to find the windows script:
?callStack, called at .\Distribution\Compat\Stack.hs:45:13 in etlas_1lPwCyzvAfM6
mN1zk19Qet:Distribution.Compat.Stack
  callStack, called at .\Distribution\Simple\Utils.hs:592:44 in etlas_1lPwCyzvAf
M6mN1zk19Qet:Distribution.Simple.Utils
  withCallStackPrefix, called at .\Distribution\Simple\Utils.hs:629:7 in etlas_1
lPwCyzvAfM6mN1zk19Qet:Distribution.Simple.Utils
  withMetadata, called at .\Distribution\Simple\Utils.hs:354:15 in etlas_1lPwCyz
vAfM6mN1zk19Qet:Distribution.Simple.Utils
  die', called at .\Distribution\Simple\Program\Db.hs:423:28 in etlas_1lPwCyzvAf
M6mN1zk19Qet:Distribution.Simple.Program.Db
  requireProgram, called at .\Distribution\Simple\Configure.hs:1471:27 in etlas_
1lPwCyzvAfM6mN1zk19Qet:Distribution.Simple.Configure
  configureRequiredProgram, called at .\Distribution\Simple\Configure.hs:1415:10
 in etlas_1lPwCyzvAfM6mN1zk19Qet:Distribution.Simple.Configure
  configureRequiredPrograms, called at .\Distribution\Simple\Configure.hs:594:11
 in etlas_1lPwCyzvAfM6mN1zk19Qet:Distribution.Simple.Configure
  configure, called at .\Distribution\Simple.hs:593:20 in etlas_1lPwCyzvAfM6mN1z
k19Qet:Distribution.Simple
  confHook, called at .\Distribution\Simple\UserHooks.hs:67:5 in etlas_1lPwCyzvA
fM6mN1zk19Qet:Distribution.Simple.UserHooks
  confHook, called at .\Distribution\Simple.hs:224:24 in etlas_1lPwCyzvAfM6mN1zk
19Qet:Distribution.Simple
  configureAction, called at .\Distribution\Simple.hs:184:19 in etlas_1lPwCyzvAf
M6mN1zk19Qet:Distribution.Simple

etlas.exe: The program 'alex' is required but it could not be found.
  • So it seems that the functions used to find executables doesn't take in account the windows specific script name
    • If you place a alex.exe in the store alex path it works
  • the workaround is set the path to alex.cmd script in etlas global config or as cli param --with-alex path
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant