Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log globbing anomalies: max path, drive enumeration #3642

Open
cdmihai opened this issue Aug 21, 2018 · 8 comments
Open

Log globbing anomalies: max path, drive enumeration #3642

cdmihai opened this issue Aug 21, 2018 · 8 comments
Labels
Area: Debuggability Issues impacting the diagnosability of builds, including logging and clearer error messages. backlog Feature - Globbing grab-next The issue is at the top of the backlog and should be worked on soon. performance Performance-Scenario-Solution-Open This issue affects solution open performance. Priority:1 Work that is critical for the release, but we could probably ship without size:3 triaged

Comments

@cdmihai
Copy link
Contributor

cdmihai commented Aug 21, 2018

  • Drive enumeration. The more general problem is when the glob pattern contains properties which evaluate to empty. ($(src)/**/*.cs evaluates to /**/*.cs).
  • Original wildcard pattern is retuned (as it sometimes happens). Maybe also include the reason.
@cdmihai cdmihai added the Area: Debuggability Issues impacting the diagnosability of builds, including logging and clearer error messages. label Aug 21, 2018
@cdmihai cdmihai self-assigned this Aug 21, 2018
@cdmihai cdmihai changed the title Log globbing anomalies Log globbing anomalies: max path, drive enumeration, etc Feb 25, 2019
@cdmihai cdmihai removed their assignment Mar 29, 2019
@rainersigwald rainersigwald added this to the 16.5 Preview3 milestone Dec 2, 2019
@rainersigwald
Copy link
Member

Let's spike on this in the next sprint: if it's easy to do (because we have a logging context where we'd like to collect the timing/bad patterns and log them) we'll do it, and if not then we'll describe what does exist here.

@Forgind
Copy link
Member

Forgind commented Feb 13, 2020

I have two partial solutions (one per commit) here. Do you think it's better to try to sense a globbing anomaly while expanding a property or wait until we're globbing and assume no one wants to enumerate their whole drive? I could also try to pass information about empty properties from one to the other, but that would be complicated and a lot of extra information, so I don't think it's worth it.

@cdmihai
Copy link
Contributor Author

cdmihai commented Feb 13, 2020

Keep in mind these things (property evaluation, glob parsing/expanding) are on the hot path, so newly added logic (like additional regex matching) has a good chance of being picked up by RPS. For globbing anomalies I would just change the globbing code to record diagnostics and bubble them upwards to the evaluator / expander which can log appropriate message. For drive enumeration I would avoid duplicating the knowledge of glob syntax between the glob parsing code and the expander (glob parsing code should be the only one that knows the syntax). The glob parsing code should just record a "drive enumeration" diagnostic when it detects that the fixed directory part is a drive, which then is bubbled up to a layer appropriate for logging.

@panopticoncentral panopticoncentral added performance Performance-Scenario-Solution-Open This issue affects solution open performance. labels Mar 31, 2020
@panopticoncentral panopticoncentral removed this from the MSBuild 16.6 milestone Jun 9, 2020
@panopticoncentral panopticoncentral added the Priority:1 Work that is critical for the release, but we could probably ship without label Mar 23, 2021
@rokonec
Copy link
Contributor

rokonec commented Apr 16, 2021

@ladipro has any of your recent changes in globs addressed that?

@ladipro
Copy link
Member

ladipro commented Apr 16, 2021

@rokonec no, the recent globbing changes did not improve logging. The unintended drive enumeration problem was somewhat alleviated in #5669 but I agree that this issue should be in backlog.

@AR-May AR-May added grab-next The issue is at the top of the backlog and should be worked on soon. size:3 labels Aug 9, 2021
@AR-May AR-May changed the title Log globbing anomalies: max path, drive enumeration, etc Log globbing anomalies: max path, drive enumeration Aug 9, 2021
@mruxmohan4
Copy link
Contributor

mruxmohan4 commented Nov 11, 2021

@ladipro are there any updates on logging/surfacing an exception for max path during wildcard expansion?

@ladipro
Copy link
Member

ladipro commented Nov 15, 2021

@mruxmohan-msft there have been some internal discussions but no conclusion yet. The issue still exists. I'll leave a comment in #7029.

@rokonec
Copy link
Contributor

rokonec commented Jan 9, 2024

@JanKrivanek This might be good candidate for analyzers V1, especially max path, it is so serious that it maybe shall be warning but warnings could break some builds

@AR-May AR-May added the triaged label Apr 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Debuggability Issues impacting the diagnosability of builds, including logging and clearer error messages. backlog Feature - Globbing grab-next The issue is at the top of the backlog and should be worked on soon. performance Performance-Scenario-Solution-Open This issue affects solution open performance. Priority:1 Work that is critical for the release, but we could probably ship without size:3 triaged
Projects
None yet
Development

No branches or pull requests

9 participants