René's URL Explorer Experiment


Title: Use of `rel/` dir in workdir makes workdir unclean · Issue #65 · function61/turbobob · GitHub

Open Graph Title: Use of `rel/` dir in workdir makes workdir unclean · Issue #65 · function61/turbobob

X Title: Use of `rel/` dir in workdir makes workdir unclean · Issue #65 · function61/turbobob

Description: Problem Scenario: compile Go app. Go auto-embeds Git metadata such as workdir clean status. function61/gokit/app/dynversion propagates this to version number as -dev suffix to indicate all builds are dev versions: https://github.com/func...

Open Graph Description: Problem Scenario: compile Go app. Go auto-embeds Git metadata such as workdir clean status. function61/gokit/app/dynversion propagates this to version number as -dev suffix to indicate all builds a...

X Description: Problem Scenario: compile Go app. Go auto-embeds Git metadata such as workdir clean status. function61/gokit/app/dynversion propagates this to version number as -dev suffix to indicate all builds a...

Opengraph URL: https://github.com/function61/turbobob/issues/65

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Use of `rel/` dir in workdir makes workdir unclean","articleBody":"## Problem\r\n\r\nScenario: compile Go app. Go auto-embeds Git metadata such as workdir clean status.\r\n\r\n`function61/gokit/app/dynversion` propagates this to version number as `-dev` suffix to indicate all builds are dev versions:\r\n\r\nhttps://github.com/function61/gokit/blob/f6c12a3fbe5e9b101501b9ee9c0709258543e1de/app/dynversion/version.go#L47-L49\r\n\r\n\r\n## Partial fix\r\n\r\nShipped 7785765328d9e756e9ea24f42e5f1012e8b460b0 to at least not make all GitHub workflow -initiated builds not auto-mark the workdir as unclean.\r\n\r\n\r\n## Footgun\r\n\r\nSince Git does not track directories, the fact that say [`buildkit-golang` creates `rel/` directory before build](https://github.com/function61/buildkit-golang/blob/41efd88da429006898af8c3a64b9f58371c8843d/build-go-project.sh#L166-L169) does not make the workdir unclean from Git perspective.\r\n\r\nBut let's say we have app we want to cross-compile both for:\r\n\r\n1. amd64\r\n2. riscv64\r\n\r\nWhen we start building item 1 the workdir is clean because `rel/` dir is empty at start of build.\r\n\r\nNow when we start building item 2 the workdir is unclean because the item 1 is in there.\r\n\r\nResult:\r\n\r\n| Build | Version |\r\n|---|---|\r\n| amd64 | 1.2.3 |\r\n| riscv64 | 1.2.3-dev |\r\n\r\nThat's hell of a footgun.\r\n\r\nFor consistency we'd probably like to create the `rel/` directory and drop some dummy file in there, better the possible `-dev` suffix to apply to all executables instead of `n \u003e 1`. This would be worsened by building those in parallel, then it would be nondeterministic which versions are marked dev..\r\n\r\nThis `rel/` dir affecting workdir cleanliness state could be mitigated by `.gitignore`'ing the dir, but am not sure if it's nice to impose that to every project.\r\n\r\n## Have the build result directory be outside of the VCS workdir?\r\n\r\nThis would solve the footgun thing. How to do this properly without adding too much complexity to all users?\r\n\r\n\r\n## Would we realistically be able to maintain clean workdirs in ALL situations?\r\n\r\nThere are concepts like code generation which by design make the normal build look like it's always unclean.\r\n\r\nMaybe it'd be OK to accept the fact that with some projects it's not pragmatic to maintain the clean state.","author":{"url":"https://github.com/joonas-fi","@type":"Person","name":"joonas-fi"},"datePublished":"2024-11-19T11:12:37.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/65/turbobob/issues/65"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:148c2e34-4ce4-8fce-e674-e28eb4545921
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id919A:12F25:43D261:612861:6A4BC7C8
html-safe-nonce06b6d5f72ac7791937367999f5b373e9a488d1e9a6dd4e789b701da79fbe9f38
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MTlBOjEyRjI1OjQzRDI2MTo2MTI4NjE6NkE0QkM3QzgiLCJ2aXNpdG9yX2lkIjoiNzI1NDAxODExNzY3NTUwMTUxMiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmace8d8ed61640976e132f49eeaa95ed697b7c7c5ff5a1e4955650697e2f0ba4402
hovercard-subject-tagissue:2671792021
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/function61/turbobob/65/issue_layout
twitter:imagehttps://opengraph.githubassets.com/ddf7b34818fc0299858cfb03b5c7320acbc41e90c34cee5d5493356af18eaaf5/function61/turbobob/issues/65
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/ddf7b34818fc0299858cfb03b5c7320acbc41e90c34cee5d5493356af18eaaf5/function61/turbobob/issues/65
og:image:altProblem Scenario: compile Go app. Go auto-embeds Git metadata such as workdir clean status. function61/gokit/app/dynversion propagates this to version number as -dev suffix to indicate all builds a...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamejoonas-fi
hostnamegithub.com
expected-hostnamegithub.com
None14aa00ce5bdb34d0eefb5facbffd7de9e144c688d8a93ef8df902d5f94b51dd7
turbo-cache-controlno-preview
go-importgithub.com/function61/turbobob git https://github.com/function61/turbobob.git
octolytics-dimension-user_id22049800
octolytics-dimension-user_loginfunction61
octolytics-dimension-repository_id146426259
octolytics-dimension-repository_nwofunction61/turbobob
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id146426259
octolytics-dimension-repository_network_root_nwofunction61/turbobob
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release58b8f89190447502561829f30862aa0a99d53367
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/function61/turbobob/issues/65#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Ffunction61%2Fturbobob%2Fissues%2F65
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Ffunction61%2Fturbobob%2Fissues%2F65
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=function61%2Fturbobob
Reloadhttps://github.com/function61/turbobob/issues/65
Reloadhttps://github.com/function61/turbobob/issues/65
Reloadhttps://github.com/function61/turbobob/issues/65
Please reload this pagehttps://github.com/function61/turbobob/issues/65
function61 https://github.com/function61
turbobobhttps://github.com/function61/turbobob
Notifications https://github.com/login?return_to=%2Ffunction61%2Fturbobob
Fork 0 https://github.com/login?return_to=%2Ffunction61%2Fturbobob
Star 8 https://github.com/login?return_to=%2Ffunction61%2Fturbobob
Code https://github.com/function61/turbobob
Issues 32 https://github.com/function61/turbobob/issues
Pull requests 2 https://github.com/function61/turbobob/pulls
Actions https://github.com/function61/turbobob/actions
Security and quality 0 https://github.com/function61/turbobob/security
Insights https://github.com/function61/turbobob/pulse
Code https://github.com/function61/turbobob
Issues https://github.com/function61/turbobob/issues
Pull requests https://github.com/function61/turbobob/pulls
Actions https://github.com/function61/turbobob/actions
Security and quality https://github.com/function61/turbobob/security
Insights https://github.com/function61/turbobob/pulse
Use of rel/ dir in workdir makes workdir uncleanhttps://github.com/function61/turbobob/issues/65#top
enhancementNew feature or requesthttps://github.com/function61/turbobob/issues?q=state%3Aopen%20label%3A%22enhancement%22
https://github.com/joonas-fi
joonas-fihttps://github.com/joonas-fi
on Nov 19, 2024https://github.com/function61/turbobob/issues/65#issue-2671792021
https://github.com/function61/gokit/blob/f6c12a3fbe5e9b101501b9ee9c0709258543e1de/app/dynversion/version.go#L47-L49https://github.com/function61/gokit/blob/f6c12a3fbe5e9b101501b9ee9c0709258543e1de/app/dynversion/version.go#L47-L49
7785765https://github.com/function61/turbobob/commit/7785765328d9e756e9ea24f42e5f1012e8b460b0
buildkit-golang creates rel/ directory before buildhttps://github.com/function61/buildkit-golang/blob/41efd88da429006898af8c3a64b9f58371c8843d/build-go-project.sh#L166-L169
enhancementNew feature or requesthttps://github.com/function61/turbobob/issues?q=state%3Aopen%20label%3A%22enhancement%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.