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

Allow browsing a specific version/tag on source.dot.net #207

Open
cremor opened this issue Feb 2, 2022 · 3 comments
Open

Allow browsing a specific version/tag on source.dot.net #207

cremor opened this issue Feb 2, 2022 · 3 comments

Comments

@cremor
Copy link

cremor commented Feb 2, 2022

I just found a method on source.dot.net that was commited just 5 days ago and therefore is not yet available in .NET 6. Now, this case is quite obvious, because the API simply doesn't exist when you try to use it.
But then I thought about implementation details. What if I use source.dot.net to learn how something is actually implemented in .NET? I might find code on source.dot.net that is different from what my application will actually execute.

I think a good solution would be to allow the user to select a .NET version on source.dot.net. Or, to be better in sync with GitHub, maybe a Git tag. It could then default to the latest released version/tag, but allow the user to change it. Additionally, the user could select the main branch to retain the current behaviour of showing the latest code (that might not be released yet).

@KirillOsenkov
Copy link
Owner

Unfortunately this is out of scope and is unlikely to be ever implemented. While a good idea, the way SourceBrowser is implemented it pregenerates static HTML for the entire repo, so having these per commit would be prohibitively expensive.

Other system that are designed differently may support it, but we won't. Sorry!

@cremor
Copy link
Author

cremor commented Feb 4, 2022

That's sad to hear, but then how about a simpler solution:
Would it be possible that source.dot.net only shows the latest released version (e.g. latest Git tag)? If someone really wants to see unreleased code he can always switch to GitHub.

The tag name could then be shown in the header banner, just like https://referencesource.microsoft.com shows ".NET Framework 4.8" in its banner.

Btw, that brings me to a question: Is the source on https://referencesource.microsoft.com static? I don't expect many (any?) changes for .NET Framework, but just as a general question.

@KirillOsenkov
Copy link
Owner

Yes, https://referencesource.microsoft.com is frozen in time forever

It is more practical to index the latest on https://source.dot.net because indexing happens as part of builds, and builds build the latest.

Sorry about the inconvenience.

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

No branches or pull requests

2 participants