Some tips:
- Unless the code is very small, or your feature is very big, try to put blinders on, and focus only on the code you absolutely need to to get your feature built. Use search tools to comb through the code to find the relevant methods while reading as little surrounding code as possible, tweak those methods to be different, and call that a first draft. If the maintainer wants the code refactored or differently arranged, they can help with that as part of the review process
- Being unable to build sucks, it really does. But if the software is released for your platform, it means someone out there is able to build it. And these days that someone is often an automated build tool that runs per release. See if you can figure out how this tool works. What build steps it uses, what environment it runs in, etc. If you can’t figure that out, try contacting the person who releases the builds
- If the software is in apt (if you’re on a Debian-based system), you can use
apt build-dep
,apt source
, anddebuild
to try and recreate the native apt build process. These tools will give you the source that built the system package, and its dependencies, and allow you to build a deb yourself out of it. Test the build to make sure it’s working as-is. If it is, and if the software’s dependencies haven’t changed too much, you can even use apt to fetch the old version that’s in the repos, update the code to reflect the upstream release, and then test the build there to see if it still builds. If so, now you have something you can start working off. - If you aren’t on an apt system, but do have a package manager, I assume there’s an equivalent to the workflow mentioned above
- If your change is subtle enough that you think it’s pretty low-risk, you could just edit the code even though you can’t build it. This might be sufficient for bug-fixes where you just need to check something is greater than zero, or features where you pass a true instead of a false in certain conditions or something. You should probably mention this in your PR / MR / Patch so the reviewer knows to test building it before merging.
- This one is a bit wild, but let’s say you’re on a Mac or Windows machine, and the build instructions only work for Linux. You can just run a virtual machine that’s got Ubuntu or something running on it, and use it as your build environment. These days you can probably be in a simpler situation with Docker or something more lightweight, but as a worst-case scenario, a full virtual machine is there for you if you need it
- And finally, if the tool isn’t a crazy popular or busy tool, it’s possible the maintainer or other people in the community are more approachable than you think. If they are looking for contributions, then getting a willing contributor’s build environment setup is a benefit to the project. Improving their build docs helps not just you, but potential future contributors as well. A project will usually be more helpful towards someone who says “I’m trying to build this feature, but I’m running into trouble” compared to someone saying “why doesn’t your tool do X”. You may need to be a bit patient, they’re probably doing this on volunteer hours, but they might be happy to help you get your stuff sorted out
Good luck out there, and try not to be discouraged!
Groceries, in particular, are more of an effect than a cause. Lots of people live without cars in New York City, or London, or Paris, or Toronto, or Tokyo, and they manage to eat. The reason you need to buy 7 days worth of food for two people all at once is because you live in a field far away from everything. “Getting Groceries” becomes a special trip, because, while driving, leaving the highway, stopping and parking are inconvenient.
As a pedestrian in a city, I was going to walk past 5 food stores on my way between work and home anyway, and it’s really not problem to walk in and buy only what I ran out of yesterday, or some special item I wanted for tonight’s dinner. It’s simple to shop for 5 or 10 minutes, five times a week, rather than one hour once a week, and never need more than a single bag of groceries at a time. And rather than being inconvenient, it’s actually great because I’m only buying what I need right now, the things I’m going to use as soon as I get home, so it’s very simple.
Allergies could be tricky, yeah. If you’re lucky the local shop, by nature of being smaller and more local, actually knows you and knows you need this stuff and stocks it because they know you’ll buy it from them. But that’s not a guarantee, for sure. That having been said, if the only people driving were people with corn allergies, the roads would be a much safer place!