lambda-fairy / maud

:pencil: Compile-time HTML templates for Rust
https://maud.lambda.xyz
Apache License 2.0
1.98k stars 132 forks source link

escape.rs symlink broken on Windows #343

Closed lunabunn closed 1 year ago

lunabunn commented 2 years ago

Current main is broken on Windows due to maud_macros/src/escape.rs being a symlink, which is broken on Windows.

The obvious fix would be to copy-and-paste the contents over, but perhaps there's a better solution?

lambda-fairy commented 2 years ago

Oh, that's unfortunate.

I originally added that symlink to avoid duplicating the file. I thought it was an improvement over the previous approach, which was to publish a separate helper crate that was a dependency of both.

What do other libraries do instead?

lunabunn commented 2 years ago

Oh, that's unfortunate.

I originally added that symlink to avoid duplicating the file. I thought it was an improvement over the previous approach, which was to publish a separate helper crate that was a dependency of both.

What do other libraries do instead?

Could we just have escape.rs live in maud_macros as a pub mod (or be reexported), and then use that from maud?

lambda-fairy commented 2 years ago

IIRC, proc macro crates can only export macros, not normal functions.

Xe commented 1 year ago

This is broken on NixOS too when building in the nix store.

lambda-fairy commented 1 year ago

Looks like the symlink approach has too many downsides. I'll just duplicate it then 😿