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

Allow empty config file in flex output #2200

Merged
merged 1 commit into from
Jun 16, 2024

Conversation

joto
Copy link
Collaborator

@joto joto commented Jun 15, 2024

No flex config file, or one that doesn't define any tables is usually not very useful. But it can be used in slim mode to have the middle tables only. Or it can be used to do some other processing or instead if the null output for testing.

We still output a warning, but no error any more if the style file is missing from the command line or if there are no tables defined.

@joto joto force-pushed the allow-empty-config branch from be90afc to 8d17d0e Compare June 15, 2024 17:54
@lonvia
Copy link
Collaborator

lonvia commented Jun 16, 2024

Empty tables are fine but I would prefer that you have to explicitly state -S empty.lua to achieve the goal. It's an easy mistake to forget the -S parameter and then searching for hours why the output tables do not appear.

No flex config file, or one that doesn't define any tables is usually
not very useful. But it can be used in slim mode to have the middle
tables only. Or it can be used to do some other processing or instead
if the null output for testing.

This change allows an empty config file, but a warning is printed that
no output tables are defined. You still have to specify a config file,
it can be an empty one, but it has to be there. This is so that if the
user forgets naming a config file on the command line they get an error
and not only a warning that might be missed.
@joto joto force-pushed the allow-empty-config branch from 8d17d0e to e7ed8d0 Compare June 16, 2024 09:26
@joto
Copy link
Collaborator Author

joto commented Jun 16, 2024

Changed as requested.

@lonvia lonvia merged commit 03eedd4 into osm2pgsql-dev:master Jun 16, 2024
26 checks passed
@joto joto deleted the allow-empty-config branch June 16, 2024 16:02
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 this pull request may close these issues.

3 participants