Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Allow editing (including comments) of xmake.conf #3079

Closed
matty0ung opened this issue Nov 18, 2022 · 7 comments
Closed

Allow editing (including comments) of xmake.conf #3079

matty0ung opened this issue Nov 18, 2022 · 7 comments

Comments

@matty0ung
Copy link

Is your feature request related to a problem? Please describe.

Imagine that you want to use a different directory than build for the build. Maybe you are trying out Xmake as a possible alternative build system for an existing project, and you don't want it making modifications in the existing build directory that the current build system uses.

After poking around, you discover that (on Linux) .xmake/linux/x86_64/xmake.conf contains a useful-looking setting buildir = "build". Maybe this is build directory. So you add a comment -- Changed to not clash with old build system and edit the line to buildir = "xbuild". Now you run xmake again and it removes the comment from the file.

Describe the solution you'd like

I don't necessarily mind that the config files are in hidden directories, but it is painful that they are not editable. Can we allow edits and comments in the file and have xmake respect them? (Also, it would be good for the first line of the .conf file always to be a comment. Then you would not have to guess what the format is for comments!)

Describe alternatives you've considered

I had a look at #820 but it didn't seem to be quite the same issue.

Additional context

No response

@SirLynix
Copy link
Member

xmake.conf is an internal file used by xmake to retains its configuration across runs, it's not made to be edited (but you can export/import it using xmake config --export/import).

You can configure the buildir using xmake f --builddir=xbuild, this is documented here.

@matty0ung
Copy link
Author

OK, I see. It's a shame that the documentation implies that buildir is a read-only variable. But I see xmake f --help gives the info.

By the way, could it be possible to have builddir or build_dir as a synonym for buildir? The latter seems wrong to me.

@waruqi
Copy link
Member

waruqi commented Nov 19, 2022

It is not a read-only variable. just xmake f --buildir=xxxx

@qudix
Copy link
Contributor

qudix commented Nov 19, 2022

buildir is indeed a mispelling, not sure what can be done to fix that however (maybe deprecation?), not really that big a deal.

@waruqi
Copy link
Member

waruqi commented Nov 19, 2022

I know it's the wrong spelling because I don't like builddir, which has two repeated dd characters, so I've simplified it to buildir. maybe it's just a matter of my personal habits, but I don't really want to change it just yet.

@SirLynix
Copy link
Member

for english speakers (and I think it's even worse for native speakers) it's a bit misleading, maybe introducing build_dir as an alias of buildir would be a good idea here? same for other similar options

@matty0ung
Copy link
Author

I wouldn't exactly say changing builddir to buildir is a simplification. I mean it's one character less to type and beneficial if you don't like double Ds, but it arguably increases complexity because it's unexpected/misleading.

FWIW I there is an advantage to having a clear consistent naming convention, eg using snake_case or camelCase.

@xmake-io xmake-io locked and limited conversation to collaborators Nov 30, 2022
@waruqi waruqi converted this issue into discussion #3114 Nov 30, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Projects
None yet
Development

No branches or pull requests

4 participants