-
Notifications
You must be signed in to change notification settings - Fork 21
RFC - Debug from Packaged Build and removal of SOM_PATH #107
Comments
I agree that anything we can do to make a debug build more like a release/packaged build is the way to go. |
I'm going to inject some history into these two arguments. I put them in because after realizing that I was going to need a custom build of the swift compiler I needed to know where to look for it and had absolutely no idea how SoM was going to be packaged. When in doubt, apply indirection - I made those arguments. As the primary user of SoM, the following use cases have to be met:
I never use SOM_PATH as it makes 2 and 3 unreliable. I'm all for making the debug build more like a packaged build. Probably the way to do that is to make a separate script to build the swift compiler without --clean, then package it/put it where it needs to be rather than depending on it to live where it was just built. I know that @chamons dug into some of the tl;dr - I'm all for improvements, but changes that get made to workflow need to:
|
I completely agree that we should keep everybody's workflow as good as possible, which is just more fun because everybody's workflow is different 😄 Example: when working on my recent changes I modified the unit tests to not use random paths in /tmp, but instead a stable path, which additionally is not cleaned after the test completes, but the next time a test is executed. This had a couple of benefits:
Knowing more about the code might have made it easier to be more specific when things failed, but this worked well for me. A couple of ideas:
The changes I mentioned above helped me here. I also noticed that you can just debug the unit test, which is great, but depending on the problem might not be the easiest (it also requires known where to put the breakpoints, which takes a little while to learn).
I'm assuming you run
I like making command lines copy-pastable, so that it's just a matter of pasting the entire thing into VSfM's Run arguments, then execute the project. Creating command lines with full paths (as opposed to relative paths) help a lot here.
Making command lines copy-pastable helps a lot with this too, then you just prepend |
Right now debugging tom-swifty in the sln does not "do the same thing" as launching it from a package.
I came across it while working on https://github.com/xamarin/maccore/issues/906 and it has bitten me multiple times before. You can not copy paste arbitrary command line arguments into a debug session and expect success.
Today we have a SOM_PATH "hack" I added that kinda does the same thing if you set it right but not really.
This RFC proposes the following:
make package
already doesThis way we can always assume our dependent libraries are in sane relative locations and consumers can stop caring about their locations.
Thoughts?
The text was updated successfully, but these errors were encountered: