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

Review line-specific linking, maybe link to specific commit #6

Open
matkoniecz opened this issue Feb 20, 2022 · 1 comment
Open

Review line-specific linking, maybe link to specific commit #6

matkoniecz opened this issue Feb 20, 2022 · 1 comment

Comments

@matkoniecz
Copy link
Owner

extracted from #4 - reported by @mnalis

when linking files and referring to specific line numbers, it would be better to reference specific commit version of that file (even if older/possibly obsolete) then the master. For example, in implement a fully custom tag parsing, still combined with filter syntax links to https://github.com/streetcomplete/StreetComplete/blob/master/app/src/main/java/de/westnordost/streetcomplete/quests/opening_hours/AddOpeningHours.kt#L137-L151 which seems to be wrong line numbers currently.

I hope that recent changes (some triggered by writing this texts, some by linting) will stabilize. I will review links and set reminder to do it again in few months.

@matkoniecz matkoniecz changed the title Revie line-specific linking, maybe link to specific commit Review line-specific linking, maybe link to specific commit Feb 20, 2022
@mnalis
Copy link

mnalis commented Feb 20, 2022

Note you can also link to tag name (i.e. release version), e.g. https://github.com/streetcomplete/StreetComplete/blob/v40.1/app/src/main/java/de/westnordost/streetcomplete/quests/opening_hours/AddOpeningHours.kt#L126-L144

That way it is even shorter then link to master, more readable, and easier to find/change (e.g. "oh, in v50.0 we changed this file, so we need to update all links linking to lower version"), while providing guaranteed stability that docs won't randomly break links or show to wrong parts of files causing more confusion.

But that if you link to master, than you'd basically have to recheck everytime something is updated in master to be sure links didn't broke, which is not only inhuman amount of effort and stressful, or links will go stale and cause confusion to users reading the docs.

Much better to links docs to specific release tag so they won't ever break automatically, and then periodically (at your leisure with no hurry) update them to newer release (making changes to linenumbers as needed).

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