Skip to content

Remove duplicate entries and assets/ folder in .build file in HTML formatter #2123

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

Merged

Conversation

eksperimental
Copy link
Contributor

Previously the generated .build file would contain these entries:

...
assets
assets/kv-observer.png
assets/logo.png
assets/logo.png
...

…rmatter

Previously the generated `.build` file would contain these entries:

    ...
    assets
    assets/kv-observer.png
    assets/logo.png
    assets/logo.png
    ...
Copy link

github-actions bot commented May 9, 2025

generate_redirects(config, ".html"))
|> Enum.uniq()
|> Kernel.--([@assets_dir])
|> Enum.sort()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's move this handling to the generate_build function instead? It feels it is more part of its concern. Also, do we need to exclude @assets_dir? Why is it showing up in the list in the first place?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have moved the logic to generate_build.

I don't think we need to list folders in the .build file. If we decide to, we should be consistent and list all the folders consistently.
It is showing up because File.cp_r!/3 returns the dirs as well as the files.
I have taken a different approach and exclude all dirs/subdirs for the assets.

@josevalim josevalim merged commit dfa2ab4 into elixir-lang:main May 10, 2025
5 checks passed
@josevalim
Copy link
Member

💚 💙 💜 💛 ❤️

@eksperimental eksperimental deleted the chore/dedup-build-file branch May 10, 2025 10:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants