-
Notifications
You must be signed in to change notification settings - Fork 97
Closes #791: Remove duplicated check table in MultiTypeSymbolTable #792
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
Conversation
…olTable This PR (Closes Bears-R-Us#791) - Changes name of `check` in `MultiTypeSymbolTable` to `checkTable` - Updates functions in `MultiTypeSymbolTable.chpl` to use the existing `checkTable` function to check if a symbol is in the symbol table - Replaces references to `check` with `checkTable`
| } else { | ||
| if registry.contains(name) { | ||
| mtLogger.error(getModuleName(),getRoutineName(),getLineNumber(), | ||
| "Registered entry is not in SymTab: %s".format(name)); | ||
| } else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This condition in deleteEntry is one area that I was unsure about. This case of "registered object that's not in the symbol table" is no longer captured and logged since the generic "in symbol table check" is done before checking in registry. I could switch the order and add the logging back in if people want. My thinking was this shouldn't happen and the code is cleaner without multiple cases
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to make sure I understand this correctly: In both implementations if the item is not in the SymTab we're still going to throw an error. So the difference here is whether we log additional information about the missing item (whether it was registered or not).
So my (rhetorical) question is what would we do with that additional information. Is it going to help us determine what happened / what led to the item being missing? I'm not sure, I think I'm leaning towards no it's not really helpful, but I'm still a bit of a newb here.
If we decided that extra logging information is useful, I'd probably wrap the checkTable call in a try/catch, log the registry info and then re-throw the error.
glitch
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall I think this looks pretty good and cleans up the code quite a bit.
I think others may need to weigh in on whether we should keep the additional logging in the deleteEntry section, but if it isn't actionable information then I lean towards no, we don't need it. (See comments in that section.)
mhmerrill
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am ok with these changes
- Updates logging statements to use logLevel instead of v (PR Bears-R-Us#760) - Updates `check` to `check_table` (PR Bears-R-Us#792) - Removes outdated `Strings.attach` function which used `_` for subcomponents (new convention is `.` per PR Bears-R-Us#774) - Makes `unregister_strings_by_name` a staticmethod Minimum changes to pass current tests (2/2): Manually applied recent changes to `SegmentedArray.chpl` because automatic merge was thrown off by addition of `class SegSArray` including: -PR Bears-R-Us#666 string test ends_with failure -PR Bears-R-Us#781 off by one in SegmentedArray peel method
- Updates logging statements to use logLevel instead of v (PR Bears-R-Us#760) - Updates `check` to `check_table` (PR Bears-R-Us#792) - Removes outdated `Strings.attach` function which used `_` for subcomponents (new convention is `.` per PR Bears-R-Us#774) - Makes `unregister_strings_by_name` a staticmethod Manually applied recent changes to `SegmentedArray.chpl` because automatic merge was thrown off by addition of `class SegSArray` including: -PR Bears-R-Us#666 string test ends_with failure -PR Bears-R-Us#781 off by one in SegmentedArray peel method
- Updates logging statements to use logLevel instead of v (PR Bears-R-Us#760) - Updates `check` to `check_table` (PR Bears-R-Us#792) - Removes outdated `Strings.attach` function which used `_` for subcomponents (new convention is `.` per PR Bears-R-Us#774) - Makes `unregister_strings_by_name` a staticmethod Manually applied recent changes to `SegmentedArray.chpl` because automatic merge was thrown off by addition of `class SegSArray` including: - PR Bears-R-Us#666 string test ends_with failure - PR Bears-R-Us#781 off by one in SegmentedArray peel method
- Updates logging statements to use logLevel instead of v (PR Bears-R-Us#760) - Updates `check` to `check_table` (PR Bears-R-Us#792) - Removes outdated `Strings.attach` function which used `_` for subcomponents (new convention is `.` per PR Bears-R-Us#774) - Makes `unregister_strings_by_name` a staticmethod Manually applied recent changes to `SegmentedArray.chpl` because automatic merge was thrown off by addition of `class SegSArray` including: - PR Bears-R-Us#666 string test ends_with failure - PR Bears-R-Us#781 off by one in SegmentedArray peel method
- Updates logging statements to use logLevel instead of v (PR Bears-R-Us#760) - Updates `check` to `check_table` (PR Bears-R-Us#792) - Removes outdated `Strings.attach` function which used `_` for subcomponents (new convention is `.` per PR Bears-R-Us#774) - Makes `unregister_strings_by_name` a staticmethod Manually applied recent changes to `SegmentedArray.chpl` because automatic merge was thrown off by addition of `class SegSArray` including: - PR Bears-R-Us#666 string test ends_with failure - PR Bears-R-Us#781 off by one in SegmentedArray peel method
- Updates logging statements to use logLevel instead of v (PR Bears-R-Us#760) - Updates `check` to `check_table` (PR Bears-R-Us#792) - Removes outdated `Strings.attach` function which used `_` for subcomponents (new convention is `.` per PR Bears-R-Us#774) - Makes `unregister_strings_by_name` a staticmethod Manually applied recent changes to `SegmentedArray.chpl` because automatic merge was thrown off by addition of `class SegSArray` including: - PR Bears-R-Us#666 string test ends_with failure - PR Bears-R-Us#781 off by one in SegmentedArray peel method
- Updates logging statements to use logLevel instead of v (PR Bears-R-Us#760) - Updates `check` to `check_table` (PR Bears-R-Us#792) - Removes outdated `Strings.attach` function which used `_` for subcomponents (new convention is `.` per PR Bears-R-Us#774) - Makes `unregister_strings_by_name` a staticmethod Manually applied recent changes to `SegmentedArray.chpl` because automatic merge was thrown off by addition of `class SegSArray` including: - PR Bears-R-Us#666 string test ends_with failure - PR Bears-R-Us#781 off by one in SegmentedArray peel method
…pass tests from PR#627: - Updates logging statements to use logLevel instead of v (PR Bears-R-Us#760) - Updates `check` to `check_table` (PR Bears-R-Us#792) - Removes outdated `Strings.attach` function which used `_` for subcomponents (new convention is `.` per PR Bears-R-Us#774) - Makes `unregister_strings_by_name` a staticmethod Manually applied recent changes to `SegmentedArray.chpl` because automatic merge was thrown off by addition of `class SegSArray` including: - PR Bears-R-Us#666 string test ends_with failure - PR Bears-R-Us#781 off by one in SegmentedArray peel method
…e with master and pass tests: - Updates logging statements to use logLevel instead of v (PR Bears-R-Us#760) - Updates `check` to `check_table` (PR Bears-R-Us#792) - Removes outdated `Strings.attach` function which used `_` for subcomponents (new convention is `.` per PR Bears-R-Us#774) - Makes `unregister_strings_by_name` a staticmethod Manually applied recent changes to `SegmentedArray.chpl` because automatic merge was thrown off by addition of `class SegSArray` including: - PR Bears-R-Us#666 string test ends_with failure - PR Bears-R-Us#781 off by one in SegmentedArray peel method
…e with master and pass tests: - Updates logging statements to use logLevel instead of v (PR Bears-R-Us#760) - Updates `check` to `check_table` (PR Bears-R-Us#792) - Removes outdated `Strings.attach` function which used `_` for subcomponents (new convention is `.` per PR Bears-R-Us#774) - Makes `unregister_strings_by_name` a staticmethod Manually applied recent changes to `SegmentedArray.chpl` because automatic merge was thrown off by addition of `class SegSArray` including: - PR Bears-R-Us#666 string test ends_with failure - PR Bears-R-Us#781 off by one in SegmentedArray peel method
…e with master and pass tests: - Updates logging statements to use logLevel instead of v (PR Bears-R-Us#760) - Updates `check` to `check_table` (PR Bears-R-Us#792) - Removes outdated `Strings.attach` function which used `_` for subcomponents (new convention is `.` per PR Bears-R-Us#774) - Makes `unregister_strings_by_name` a staticmethod Manually applied recent changes to `SegmentedArray.chpl` because automatic merge was thrown off by addition of `class SegSArray` including: - PR Bears-R-Us#666 string test ends_with failure - PR Bears-R-Us#781 off by one in SegmentedArray peel method
…e with master and pass tests: - Updates logging statements to use logLevel instead of v (PR Bears-R-Us#760) - Updates `check` to `check_table` (PR Bears-R-Us#792) - Removes outdated `Strings.attach` function which used `_` for subcomponents (new convention is `.` per PR Bears-R-Us#774) - Makes `unregister_strings_by_name` a staticmethod Manually applied recent changes to `SegmentedArray.chpl` because automatic merge was thrown off by addition of `class SegSArray` including: - PR Bears-R-Us#666 string test ends_with failure - PR Bears-R-Us#781 off by one in SegmentedArray peel method
…e with master and pass tests: - Updates logging statements to use logLevel instead of v (PR Bears-R-Us#760) - Updates `check` to `check_table` (PR Bears-R-Us#792) - Removes outdated `Strings.attach` function which used `_` for subcomponents (new convention is `.` per PR Bears-R-Us#774) - Makes `unregister_strings_by_name` a staticmethod Manually applied recent changes to `SegmentedArray.chpl` because automatic merge was thrown off by addition of `class SegSArray` including: - PR Bears-R-Us#666 string test ends_with failure - PR Bears-R-Us#781 off by one in SegmentedArray peel method
…e with master and pass tests: - Updates logging statements to use logLevel instead of v (PR Bears-R-Us#760) - Updates `check` to `check_table` (PR Bears-R-Us#792) - Removes outdated `Strings.attach` function which used `_` for subcomponents (new convention is `.` per PR Bears-R-Us#774) - Makes `unregister_strings_by_name` a staticmethod Manually applied recent changes to `SegmentedArray.chpl` because automatic merge was thrown off by addition of `class SegSArray` including: - PR Bears-R-Us#666 string test ends_with failure - PR Bears-R-Us#781 off by one in SegmentedArray peel method
…e with master and pass tests: - Updates logging statements to use logLevel instead of v (PR Bears-R-Us#760) - Updates `check` to `check_table` (PR Bears-R-Us#792) - Removes outdated `Strings.attach` function which used `_` for subcomponents (new convention is `.` per PR Bears-R-Us#774) - Makes `unregister_strings_by_name` a staticmethod Manually applied recent changes to `SegmentedArray.chpl` because automatic merge was thrown off by addition of `class SegSArray` including: - PR Bears-R-Us#666 string test ends_with failure - PR Bears-R-Us#781 off by one in SegmentedArray peel method
This PR (Closes #791)
checkinMultiTypeSymbolTabletocheckTableMultiTypeSymbolTable.chplto use the existingcheckTablefunction to check if a symbol is in the symbol tablecheckinSegmentedMsg.chplwithcheckTable