Changed List operation errors to non-terminating warnings#135
Changed List operation errors to non-terminating warnings#135SteveL-MSFT merged 9 commits intomainfrom
Conversation
SteveL-MSFT
left a comment
There was a problem hiding this comment.
We should discuss the fundamental design so that it's more general and not specific to command discovery init
| pub struct CommandDiscovery { | ||
| pub resources: BTreeMap<String, DscResource>, | ||
| provider_resources: Vec<String>, | ||
| initialization_messages: Vec<StreamMessage>, |
There was a problem hiding this comment.
I don't think this should be a member of this struct. I was imaging we'd have a new log struct that everything calls and would handle output to STDERR and also if it's emitted as JSON or text. This would replace all direct calls to eprint
There was a problem hiding this comment.
yes, new log struct that everything calls and would handle output to STDERR and also if it's emitted as JSON or text - that is on todo list. Current eprintln calls will later be refactored to calling that new API.
There was a problem hiding this comment.
the problem with calling logging functions (eprintln's fow now; new 'log' API later) right as messages are generated is that we change message types depending on what higher level operation is executing. Which means this logic has to be somehow passed to the 'log', which complicates things.
In any way, these 2 are just different implementation approaches that we can switch between later if we won't like this one; the user will have the same UX in both cases.
PR Summary
This fixes
Listpart of #121 :if part of dsc resource list, we can emit a warning type message to stderr but continue discovery listing the resultsExample output after the fix: