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

Global configuration file #551

Open
awvwgk opened this issue Aug 29, 2021 · 6 comments
Open

Global configuration file #551

awvwgk opened this issue Aug 29, 2021 · 6 comments

Comments

@awvwgk
Copy link
Member

awvwgk commented Aug 29, 2021

It might be a good point to think about having a global configuration file for fpm in ~/.fpmconfig or ~/.config/fpm/config.toml. This would allow to set global options which do not affect how packages are built, but how fpm interacts with the user or environment.

For example it would allow to disable using environment variables in fpm for compiler detection if this is an unwanted feature for some user or to enable colored output.

@epagone
Copy link
Contributor

epagone commented Aug 29, 2021

This would allow to set global options which do not affect how packages are built, but how fpm interacts with the user or environment.

So if I would like to set by default a certain profile (say debug, to be overridden to release when necessary) or a certain compiler, this is not going to be the right place, correct?

@awvwgk
Copy link
Member Author

awvwgk commented Aug 29, 2021

So if I would like to set by default a certain profile (say debug, to be overridden to release when necessary) or a certain compiler, this is not going to be the right place, correct?

As a user specific file, settings there should not be crucial for successfully building a project. I think a default profile or compiler could be borderline, but I wouldn't rule those out completely. In any case we have to design it very carefully.

@awvwgk awvwgk self-assigned this Sep 4, 2021
@awvwgk
Copy link
Member Author

awvwgk commented Sep 4, 2021

Will submit a patch for this as follow-up for #549

@urbanjost
Copy link
Contributor

.The metadata created by "fpm new" would be nice. I was playing with a TOML file for that and got sidetracked I would like to have defaults for at least

license = "license"
author = "Jane Doe"
maintainer = "[email protected]"
copyright = "Copyright 2021, Jane Doe""
homepage="xxxxxxxxxxxxxxxx"

if that has not already been considered, and the default install directory; and I think the compiler would be nice as long as FPM_COMPILER overrides it or use of environment variables is not turned off.

@urbanjost
Copy link
Contributor

Curious if you are thinking of serial data like fpm.toml file or something that would allow conditionals and aliases or something like the response files too?

@awvwgk awvwgk removed their assignment Dec 2, 2022
@awvwgk
Copy link
Member Author

awvwgk commented Dec 2, 2022

Minh @minhqdao, this could be relevant to have for the fpm registry project to store for example the path to the local registry.

Will submit a patch for this as follow-up for #549

Looks like I never came to that point last year 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

No branches or pull requests

3 participants