Skip to content

putting slash in object name causes build failure #2450

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

Open
goshhhy opened this issue May 8, 2019 · 1 comment
Open

putting slash in object name causes build failure #2450

goshhhy opened this issue May 8, 2019 · 1 comment
Labels
contributor friendly This issue is limited in scope and/or knowledge of Zig internals. standard library This issue involves writing Zig code for the standard library. zig build system std.Build, the build runner, `zig build` subcommand, package management
Milestone

Comments

@goshhhy
Copy link

goshhhy commented May 8, 2019

if using std.build.Builder.addObject in build.zig with an object name that has a slash in it, the build fails due to "no such file or directory" as it attempts to store the resulting object in a directory inside zig-cache/o that does not exist.

this behavior was not something i expected. for the use case of converting existing (large) projects in c to use the zig build system, and integrating zig files into it, being able to have the object name and path be the same string greatly simplifies writing the build.zig file.

perhaps the build system can check for this case, and automatically create the subdirectory path for the object file?

@andrewrk andrewrk added this to the 0.5.0 milestone May 9, 2019
@andrewrk andrewrk added contributor friendly This issue is limited in scope and/or knowledge of Zig internals. standard library This issue involves writing Zig code for the standard library. labels May 9, 2019
@andrewrk
Copy link
Member

andrewrk commented May 9, 2019

Related: #2279

At the very least zig should reject an object name with slashes in it.

@andrewrk andrewrk added the zig build system std.Build, the build runner, `zig build` subcommand, package management label Aug 28, 2019
@andrewrk andrewrk modified the milestones: 0.5.0, 0.6.0 Aug 28, 2019
@andrewrk andrewrk modified the milestones: 0.6.0, 0.7.0 Jan 5, 2020
@andrewrk andrewrk modified the milestones: 0.7.0, 0.8.0 Oct 30, 2020
@andrewrk andrewrk modified the milestones: 0.8.0, 0.9.0 Nov 6, 2020
@andrewrk andrewrk modified the milestones: 0.9.0, 0.10.0 May 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor friendly This issue is limited in scope and/or knowledge of Zig internals. standard library This issue involves writing Zig code for the standard library. zig build system std.Build, the build runner, `zig build` subcommand, package management
Projects
None yet
Development

No branches or pull requests

2 participants