question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

MinVer can fail if internal item groups are already populated

See original GitHub issue

This is a corner case bug that will likely never be hit, but it’s simple to fix.

The internal item groups used in the MinVer target, MinVerInputs, MinVerConsoleOutput, and MinVerOutputVersion, are populated using the Include attribute. This adds the specified values to the item groups. If those item groups already contain values before the MinVer target is executed, then the MinVer target can fail or produced unexpected results.

I hit this when I was putting together https://github.com/IdentityServer/IdentityServer4/pull/3163 because I was using minver-cli in a target which ran before the MinVer target and I was using the same item group names to extract the console output. It’s easily worked around by using different item group names, but it caused me a huge headache trying to find out what the problem was.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
viceicecommented, May 24, 2019

Ok, agree. This should hopefully never happen.

1reaction
adamralphcommented, May 24, 2019

@ViceIce thanks for chiming in. You raise a valid point, but it’s not related to this change. Before this change, the values populated in the internal item groups would be merged with any existing items which would already result in misbehaviour. After this change, the values replace any existing items, as they should have done originally. The fact that didn’t happen was a bug. This change brings the internal item groups into line with all the other variables that are set by MinVer in that they are now set, rather than added to.

The remaining question then, is whether MinVer should warn before setting any variable value, not just the internal item groups. To me, that feels like overkill. It’s true that someone could be using variable names prefixed with MinVer for other purposes, and when they install MinVer they encounter a clash. But I think this is really an edge case not worth worrying about. If it is user code that is using those clashing variable names, they can be changed. If it is another package, well, that’s a bigger problem, but again, I think it’s an edge case which will likely never happen. If it ever does, then I’d be willing to revisit this.

What do you think?

Read more comments on GitHub >

github_iconTop Results From Across the Web

minver/CHANGELOG.md at main - adamralph
Contribute to adamralph/minver development by creating an account on GitHub. ... #217: MinVer can fail if internal item groups are already populated ...
Read more >
Cornell Assessment of Pediatric Delirium: A Valid, Rapid ...
An ideal screening tool would detect all types of delirium (hyperactive, ... whereas internal consistency of the eight items was evaluated by Cronbach's...
Read more >
Troubleshooting
This section lists the various error messages that the system can display, with explanations and solutions ... If it still fails, check the...
Read more >
PRISMA 2020 explanation and elaboration: updated ...
Specify any groups used in the synthesis (such as intervention, outcome, and population groups) and link these to the comparisons specified in ...
Read more >
Fallout 76 Update Notes – July 7, 2021 - Bethesda
Today's update for Fallout 76 includes the conclusion of the Brotherhood of Steel story, the ability to craft Legendary Items, a brand-new ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found