Skip to content
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

Remove duplicate default target (redux) #550

Merged
merged 13 commits into from
Jan 21, 2020

Conversation

jyn514
Copy link
Member

@jyn514 jyn514 commented Jan 8, 2020

Same as #534 but now it doesn't crash when viewing source code.

r? @pietroalbini

@jyn514 jyn514 force-pushed the one-default-target branch from 7378912 to 3197b85 Compare January 8, 2020 01:45
@pietroalbini pietroalbini self-assigned this Jan 8, 2020
@pietroalbini
Copy link
Member

There are merge conflicts.

@pietroalbini
Copy link
Member

...and it'd be nice to add tests, at least for the web part.

@jyn514
Copy link
Member Author

jyn514 commented Jan 8, 2020

There are merge conflicts.

Yeah ... I tried to rebase, but it didn't work very well, I think because of the commit to master reverting the earlier changes. I'll fix the conflicts (again) once I've written some tests, probably tomorrow.

@jyn514
Copy link
Member Author

jyn514 commented Jan 9, 2020

So ... I can add tests for the web changes once #553 is merged (it has the .file() addition to FakeReleases). However, we don't currently have a way to test the build step works properly and generates all the static files it should. I might spend some time adding a FakeBuild tomorrow, but my schedule is about to get busy again so I may not finish.

@pietroalbini
Copy link
Member

However, we don't currently have a way to test the build step works properly and generates all the static files it should. I might spend some time adding a FakeBuild tomorrow, but my schedule is about to get busy again so I may not finish.

I'd not handle builds along with other tests in the codebase, but I'd do something separate (like rustwide's buildtest or crater's minicrater). My worry with adding built tests along with the other tests is that it encourages using a "fake build" around the codebase tests: builds are inheritely slow, as the rustwide initialization can't be parallelized, so we want to have as few of them as possible.

@jyn514 jyn514 force-pushed the one-default-target branch from 3197b85 to 12c34c8 Compare January 20, 2020 14:36
@jyn514 jyn514 changed the title One default target (redux) Remove duplicate default target (redux) Jan 20, 2020
@jyn514
Copy link
Member Author

jyn514 commented Jan 20, 2020

This is ready for review.

Copy link
Member

@pietroalbini pietroalbini left a comment

Choose a reason for hiding this comment

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

This mostly looks good! I have just a few comments.

QuietMisdreavus and others added 11 commits January 21, 2020 07:50
The code as of the previous commit would let you navigate away from the
default, but not navigate back. This adds the default target to
`successful_targets` to add a link to the dropdown in 'Platform'.

After adding that, the link would give a 404
(because we treat paths literally when sending them to the database),
so the metadata for every crate now has to include the default target,
which allows redirecting to /:crate/:version/:module/ when visiting
/:crate/:version/:module/:default-target
this required a bit of a rearchitecture
also uses a constant instead of hardcoding the default target
Only the default build should be in target/doc.
Column 5 was the files, not the default target :(

We really need a test suite.
it's been bugging me
@jyn514 jyn514 force-pushed the one-default-target branch from 469b082 to 30de0e6 Compare January 21, 2020 12:54
@jyn514
Copy link
Member Author

jyn514 commented Jan 21, 2020

Addressed review comments.

@pietroalbini pietroalbini merged commit 10dc6f5 into rust-lang:master Jan 21, 2020
@jyn514 jyn514 deleted the one-default-target branch January 21, 2020 16:36
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.

3 participants