Skip to content

Current develop does not build on Windows due to *-globbing #1118

@dk1844

Description

@dk1844

Describe the bug

Current develop does not build on Windows.

Versions

Spline develop 69cdf83

Components State

n/a

To Reproduce

Steps to reproduce the behavior OR commands run:

  1. Run mvn clean build
  2. See error:
[INFO] > spline_foxx_services@1.0.0-SNAPSHOT postbuild:replace:version
[INFO] > cross-env-shell replace '@VERSION@' $npm_package_version target/dist/*
[INFO]
[INFO] node:internal/fs/utils:345
[INFO]     throw err;
[INFO]     ^
[INFO]
[INFO] Error: ENOENT: no such file or directory, lstat 'target/dist/*'

... when fixed or circumvented, another problem arises:

[INFO] C:\Users\myuser\mypath\spline\arangodb-foxx-services\src\external\api.model.ts
[INFO]     1:48  error  Expected linebreaks to be 'LF' but found 'CRLF'  linebreak-style
[INFO]     2:17  error  Expected linebreaks to be 'LF' but found 'CRLF'  linebreak-style
...

Expected behaviour

Project to build on Windows platform, too.

Desktop (please complete the following information):

  • OS: Win 10

Additional context

The first culprit seems to be globing by * in NPM scripts on Windows in general. For us specifically here, it is used as
replace '@VERSION@' $npm_package_version target/dist/*". If attempted to use a specific file (e.g. chaning to cross-env-shell replace '@VERSION@' $npm_package_version target/dist/README.md), the process works correctly.

Related info https://stackoverflow.com/questions/27594550/glob-wildcards-in-windows-npm/30114333#30114333

The second problem arises due to the fact that the arangodb-foxx-services\src\external\api.model.ts is in-place generated, hence it takes line endings based on local platform.

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions