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

Project.id can collide for projects with the same tree, but different project files #1119

Open
dairiki opened this issue Mar 10, 2023 · 0 comments
Labels

Comments

@dairiki
Copy link
Contributor

dairiki commented Mar 10, 2023

Currently, Project.id is a hash that depends only on Project.tree (the path to the directory that contains the project source: the content, templates, models, assets, and other directories).

The id is used to construct the default output path and (hashed with other bits) the package cache path.

A given project source tree can be built with different project files (.lektorproject files). In that case, a different default output path should be used for each (project file, project tree) combination. This is not currently done.

The Project.id should probably depend on at least Project.project_file as well as Project.tree.

It should possibly include Project.themes and/or Project.name as well, since it is possible — programmatically, at least — to construct projects which vary in those attributes.
The CLI appears to always set themes from the project file settings, and gets name either from the project file or by DWIMming it from the basename of the project file or the project tree. So perhaps basing the id only on tree and project_file is sufficient?

@dairiki dairiki added the bug label Mar 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant