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

Config.civet reserved #641

Closed
zolomatok opened this issue Aug 19, 2023 · 6 comments · Fixed by #657
Closed

Config.civet reserved #641

zolomatok opened this issue Aug 19, 2023 · 6 comments · Fixed by #657

Comments

@zolomatok
Copy link
Contributor

zolomatok commented Aug 19, 2023

I haven't found any mention of a config.civet either on the website or on the GitHub page, but I guess config.civet is a reserved filename?

I happened to have config.civet file in my working dir with my own stuff in it and every time I wanted to compile, an empty output file was created and the process seemingly never completed. Took me ages to figure out what's going on.

The issue occurs even if nothing imports the file. Renaming the file solves the issue. Naming it back resurfaces it.

I assume https://civet.dev/config is supposed to detail what goes inside.
Even before it does, let's mention this in the readme, so peeps don't fall into the same hole I did.


Additionally, can we maybe think about not calling it config.civet? To me that seems too much like a project file, rather than a sort of meta config file. I assume it's a .civet file, cause it can have some dynamic fields or something? If not, can't we just have a json file instead?


After some more testing, I found it that it probably does get over it at some point (maybe), because the time it takes seems to depend on the length of the file. But my original config file of 99 lines did not finish in 13 minutes (after which I stopped the timer).

@STRd6
Copy link
Contributor

STRd6 commented Aug 19, 2023

Thanks for the report, we could definitely use some more documentation around this and may want to reconsider the naming as well.

A possible workaround is to add the --no-config flag when you run the civet command to tell it that you don't want to autoload a config file.

@edemaine
Copy link
Collaborator

  • Yes, documenting this is on my to-do list.
  • We should avoid infinite recursion when trying to explicitly compile the config file (which is going to be common e.g. when civet -c *.civet).
  • Agreed config.civet is probably too useful a filename (maybe good it's not documented yet!). I think civetconfig.civet, while repetitive, is probably better. (I think we support both, and should drop config.civet.)

@zolomatok
Copy link
Contributor Author

zolomatok commented Aug 19, 2023

I like how Bun does the naming with bunfig.toml, maybe we could do it similarly.

But civfig doesn’t sound that hot. Catconfig would be fun, but may be a stretch :)

@STRd6
Copy link
Contributor

STRd6 commented Aug 22, 2023

🐈.toml

@zolomatok
Copy link
Contributor Author

Sold! 🔨

@zolomatok
Copy link
Contributor Author

How about simply civet.toml? 🤔
catfig.toml? khajiit.toml? 😄

This was referenced Aug 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants