Discussion about Solution files, filters and CI
See original GitHub issueI found it hard to get my head around this:
Mainly because:
Sentry.sln
vsSentry.Full.sln
was not very intuitive to me. Shouldn’tSentry.sln
already be “full”? In that case, could it beSentry.sln
with everything, and just the filters on top? I understand there’s some logic based on the solution file to avoid compiling the mobile targets:
Is there another approach?
Sentry-CI-Pack.slnf
: What does give us? Sincepack
happens on the same workflow where things are built, I imagine this saves from looking what projects need to be backed (<IsPackable>true..
)? Samples are all marked as not packable already:
https://github.com/getsentry/sentry-dotnet/blob/b3f81f1cf18c877029076e184ddef4b04acdef7e/samples/Directory.Build.props#L6 Same with tests: https://github.com/getsentry/sentry-dotnet/blob/b3f81f1cf18c877029076e184ddef4b04acdef7e/test/Directory.Build.props#L8
Is the ‘speed up’ worth having to maintain this additional filter file?
- Too many
slfn
files?SentryNoSamples.slnf
,SentryAzureFunctions.slnf
, etc. Could this be justUnload project
instead or are these used often enough?
The biggest problem I see is that everytime we add a new project, we need to deal with 3 solutions and all subsequent slnf because there’s no way to use glob patterns, or negate (like everything except /samples
, or for the CodeQL filter, just add everything under src
, to name a couple).
-
Sentry.Samples.OpenTelemetry.AspNet
classic msbuild project in the repo. Becausedotnet build
doesn’t work here, there was an effort to keep these out, since the creation of this repo. It doesn’t seem like this is built in CI (and that’s probably good because it’d be slow, and require a separate build script/flow). There was another repo (https://github.com/getsentry/sentry-dotnet-samples and later https://github.com/getsentry/examples/tree/master/dotnet) to keep such samples that are rarely used and don’t need to be built in CI on each PR. -
The
.root
situation. I find these Solution Files thing a bit annoying. We have to manually curate a list of files/scripts etc to get into the solution. And when in the editor we only see what’s there. So if something new gets added to the repo, we need to ‘remember’ (my weakest point) to add. These days IDEs are smarter, Rider for example:
Already shows you all the files in the repo overlaying with the soltion: Now I can see everything in the file system, as god intended:
So I propose getting rid of all of those solution items copied over in 3 different sln
files
-
How about we stuff all of these filters in some folder?
-
It’s hard to see the side effect of some changes. It builds on your filter. But you’re actually breaking some sample or other part of the solution.
Or perhaps I’m overthinking, first time trying to contribute here in a year or so. That’s possible. Thoughts?
Issue Analytics
- State:
- Created a month ago
- Comments:5 (3 by maintainers)
Top GitHub Comments
I think there should be as few filters as possible.
Mobile
vs.No Mobile
comes to mind. I have not yet used a single.slnf
for local development.Regarding CI: I’m of the strong opinion that whatever happens in CI should be as close to what we have in our local environment. Ideally, those should be identical. I’m really not buying into speeding up CI at the cost of complexity.
Sentry.sln -> SentryNoMobile.sln
and then renameSentry.Full -> Sentry.sln
IsPackable
build property sounds good instead if that’s the only reason we have a separate solution for CI though.