-
Notifications
You must be signed in to change notification settings - Fork 87
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
Nested static aliases fail with exporting #258
Comments
Hmm, that certainly sounds like a bug introduced in the rewrite, I'll take a look... |
I've just tried this with the following code, which generates a file actions
.settings_actions
.add_static_aliases
.register_plugin("test-plugin", |_, _| {
let mut map = std::collections::HashMap::new();
map.insert("/test".to_string(), "test.txt".to_string());
Ok(map)
});
#[cfg(engine)]
actions
.export_actions
.before_export
.register_plugin("test-plugin", |_, _| {
std::fs::write("test.txt", "Hello, world!").unwrap();
Ok(())
}); This seems to work fine for me, as it does when I change the path so the file is placed in What exactly is your problematic code, and what is the precise error you're receiving? |
I haven't had time to properly investigate yet, I just got an issue from a user of I wait for the tailwind compiler process to exit before returning from the plugin so it should be done writing. |
Hmm, is this on the latest beta? |
I got around to doing more testing and it seems this is some weird behaviour from |
After further debugging, there was an error in my code but there also still seems to be an issue with perseus itself. I fixed my issue and I'm explicitly printing out whether the file exists after I run the compile step (it does), but it still says it's not there. This is just a hunch, but this feels like a path resolution issue, where regular build and export use different resolutions. |
Ok I fixed it but this is definitely a bug. If the static alias points to |
This is actually a much bigger issue: any nested static aliases will fail with exporting, because the directories needed for them are not created by the |
before_export
plugin step is finished
This issue is reporting a bug in the code of Perseus. Details of the scope will be available in issue labels.
The author described their issue as follows:
The steps to reproduce this issue are as follows:
A minimum reproducible example is available at <>.
Tribble internal data
dHJpYmJsZS1yZXBvcnRlZCxDLWJ1ZyxBLWRlcGxveW1lbnQ=
The text was updated successfully, but these errors were encountered: