-
-
Notifications
You must be signed in to change notification settings - Fork 229
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
Martin-ui packaging issue #1699
base: main
Are you sure you want to change the base?
Conversation
Seems we still have a packaging issue - npm saves files outside the build dir
for more information, see https://pre-commit.ci
…e OS error in CI is comming from precicely
for more information, see https://pre-commit.ci
I will not continue working on this today, seems like CI is really against this change.. If someone wants to look into this or has better oppinions, I would love feedback. Somewhere I apparently made a change in the code I pushed during final cleanup (=before my first commit here) 😞 |
fn main() -> std::io::Result<()> { | ||
#[cfg(feature = "webui")] | ||
{ | ||
static_files::NpmBuild::new("martin-ui") | ||
// rust requires that all changes are done in OUT_DIR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we should simply create a symlink in the outdir - no need to copy anything?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good, but as far as my logic goes, that would require basically the same code..
- if you mean placing a symlink in
OUT_DIR
:
The directory is dynamic based on compilation target (package
,debug
,..) => I don't think hardcoding them is a good way to go.
These directories are also not documented => we would be setting ourselves up for breaking changes.. - if you mean generating a symlink in the
build.rs
file:
dist
andnode_modules
may not live outside of theOUT_DIR
, if compiled by thebuild.rs
file as far as I understand. => code would basically be identical. Maybe 1-2 lines simpler, but not much..
Or do you mean something different?
What might work (thinking about it: I have not tried this part) is deleting dist
and node_modules
after the build.rs
file..
This might fuck devs over in development though..
(think: start martin-ui
, then server. node_modules
is now gone)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thinking about it:
Generating symlinks is a bit simpler code.
No recursion or dir-deletion required.. => more like 4-5 lines
Will migrate to that once I have the time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems we still have a packaging issue - npm saves files outside the build dir.
Fixes #1667
See prior partial fix in #1668