[users at bb.net] Possible Windows compatibility problem in www/base

Pierre Tardy tardyp at gmail.com
Tue Mar 24 07:17:32 UTC 2020


Hello,

os.path.join is a python thing. We try to use it as much as possible,
indeed.
Here this is an issue with the node.js build scripts.
Nobody tests those on windows, so it make sense it brakes.

We will accept patches to fix any windows issue. Please send a proper fix
using something like
https://nodejs.org/api/path.html#path_path_join_paths

Regards,
Pierre


Le lun. 23 mars 2020 à 22:42, Trevor Hook <trevor.k.hook at googlemail.com> a
écrit :

> For cross platform compatibility, not specific to builbot config, I often
> do something along the lines of:
>
> pathway = 'path/to/file'
> pathway_parts = pathway.split('/')
> pathway_combined = str(os.path.join(pathway_parts))
>
> i.e. I'm setting paths as a str for human readable convenience, splitting
> it into component parts and then using some platform independent path
> package to recombine the components into the local systems expectation of a
> path string.
>
> In Python3, I tend to use pathlib Path rather than is.path, mainly because
> I tend to be working with Path objects anyway.
>
> Trevor
>
> On 23 March 2020 21:03:12 GMT, "Yngve N. Pettersen" <yngve at vivaldi.com>
> wrote:
> >Hello all,
> >
> >I am currently trying to update our customized buildbot instance, and
> >have
> >been running into problems when trying to build our modified www/base
> >package.
> >
> >I am running "yarn build" on Windows, in a Git Bash shell, but the
> >build
> >failed
> >
> >I got this message:
> >
> >-------------------
> >'.' is not recognized as an internal or external command,
> >operable program or batch file.
> >www\base\node_modules\webpack-shell-plugin\lib\index.js:168
> >         throw error;
> >         ^
> >
> >Error: Command failed: ./node_modules/.bin/pug src/app/index.jade -o
> >buildbot_www/static/
> >'.' is not recognized as an internal or external command,
> >operable program or batch file.
> >
> >     at ChildProcess.exithandler (child_process.js:303:12)
> >     at ChildProcess.emit (events.js:311:20)
> >     at maybeClose (internal/child_process.js:1021:16)
> >     at Socket.<anonymous> (internal/child_process.js:443:11)
> >     at Socket.emit (events.js:311:20)
> >     at Pipe.<anonymous> (net.js:668:12) {
> >   killed: false,
> >   code: 1,
> >   signal: null,
> >cmd: './node_modules/.bin/pug src/app/index.jade -o
> >buildbot_www/static/'
> >
> >-------------------
> >
> >I have just confirmed that the problem is "/" vs "\" (forward vs.
> >backward
> >slash).
> >
> >Change the following lines in www/base/webpack.config.js from
> >
> >   new WebpackShellPlugin({
> >     onBuildEnd:['./node_modules/.bin/pug src/app/index.jade -o
> >buildbot_www/static/']
> >   }),
> >
> >
> >to
> >
> >    new WebpackShellPlugin({
> >       onBuildEnd:['.\\node_modules\\.bin\\pug src/app/index.jade -o
> >buildbot_www/static/']
> >    }),
> >
> >and the build works.
> >
> >This is probably a problem caused by webpack, but maybe you know how to
> >
> >work around it?
> >
> >In the meantime I am patching the file locally.
> _______________________________________________
> users mailing list
> users at buildbot.net
> https://lists.buildbot.net/mailman/listinfo/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.buildbot.net/pipermail/users/attachments/20200324/c72e9f2b/attachment.html>


More information about the users mailing list