Skip to content

Build on windows support [WIP, No Merge] #586

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

Closed
wants to merge 4 commits into from

Conversation

Zexbe
Copy link
Contributor

@Zexbe Zexbe commented Feb 3, 2020

  1. Conditionally support background, so fork does not block windows from compiling
  2. Use mime_guess instead of magic crate.

Fix: #580

I am going to split this up into smaller pull requests

@jyn514
Copy link
Member

jyn514 commented Feb 3, 2020

The fork() stuff looks fine to me, we don't run on windows in prod and it will be very clear that it doesn't work if someone runs cratesfyi daemon.

I'm a little more concerned about the change to tree_mime since it hasn't been updated in a year. I also took a look about how we use mime types and it looks very fragile to me: we treat anything that doesn't start with text/ as binary (even application/json and similar). We should add tests to be sure the behavior is the same, at least for Rust, HTML, CSS, JS, markdown, and TOML.

Copy link
Member

@jyn514 jyn514 left a comment

Choose a reason for hiding this comment

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

Looks good to me! I'll wait to merge until @pietroalbini gets a chance to look at it.

@Zexbe Zexbe changed the title Build on windows support Build on windows support [No Merge] Feb 4, 2020
@Zexbe Zexbe changed the title Build on windows support [No Merge] Build on windows support [WIP, No Merge] Feb 4, 2020
@jyn514
Copy link
Member

jyn514 commented Feb 4, 2020

---- web::rustdoc::test::settings_html stdout ----
the test failed: database error: ERROR: null value in column "mime" violates not-null constraint

Try adding a migration to src/db/migrate.rs, there's lots of examples in that file.

@Zexbe Zexbe closed this Feb 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow compiling without libmagic
2 participants