NREL / openstudio-common-measures-gem

Other
8 stars 15 forks source link

OpenStudio Results - updated begin/rescue causing problems with 2.x use due to ruby version change #24

Closed DavidGoldwasser closed 4 years ago

DavidGoldwasser commented 4 years ago

https://unmethours.com/question/45411/pat-fails-as-soon-as-i-add-the-openstudio-results-measure/

It should support back to 2.0 (to allow for this it still has rescue files included with it, since some supported versions of OpenStudio didn't include the OpenStudio extension gem.

I was going to test it in 2.9.1 PAT and OS App, but I was able to reproduce error just with measure test

Error: /Users/dgoldwas/Documents/GitHub/URBANopt/openstudio-common-measures-gem/lib/measures/openstudio_results/measure.rb:306: syntax error, unexpected keyword_rescue, expecting keyword_end rescue StandardError => e

Looks like there was code cleanup on that line a few months ago

https://github.com/NREL/openstudio-common-measures-gem/blame/develop/lib/measures/openstudio_results/measure.rb

Here is that commit

https://github.com/NREL/openstudio-common-measures-gem/commit/412ae00c5c334e66170d3de114ee5dcb07e146e5

Maybe we want to turn on 2.9.1 for CI as well on all the repos? For many measures I could just make min version 3.0 but openstudio_results is a bit different in that it auto downloads for all users so I've been trying to support older versions for it.

FYI - I have not finished uploaded all repos to BCL (just common and articulation gem) I'm still working on others, and I haven't gotten to finishing up 3.0 upgrades on old OpenStudio measures repository.

https://github.com/NREL/OpenStudio-measures/pull/318

I'd like to at least get openstudio_results updated shortly for non 3.0 users.

DavidGoldwasser commented 4 years ago

I reverted the begin/rescue code for this measure and pushed it to BCL, but I want to keep it open until I update other reporting measures that likely have the same issue.