RESOLVED FIXED Bug 179522
check-webkit-style: AttributeError: 'NoneType' object has no attribute 'major'
https://bugs.webkit.org/show_bug.cgi?id=179522
Summary check-webkit-style: AttributeError: 'NoneType' object has no attribute 'major'
Fujii Hironori
Reported 2017-11-09 22:28:02 PST
check-webkit-style is broken since Bug 179426. > $ ./Tools/Scripts/check-webkit-style > Traceback (most recent call last): > File "./Tools/Scripts/check-webkit-style", line 48, in <module> > sys.exit(CheckWebKitStyle().main()) > File "/home/fujii/work/webkit/ga/Tools/Scripts/webkitpy/style/main.py", line 155, in main > patch_checker.check(patch) > File "/home/fujii/work/webkit/ga/Tools/Scripts/webkitpy/style/patchreader.py", line 84, in check > self._text_file_reader.do_association_check(fs.getcwd()) > File "/home/fujii/work/webkit/ga/Tools/Scripts/webkitpy/style/filereader.py", line 152, in do_association_check > self._processor.do_association_check(self._files, cwd, host=host) > File "/home/fujii/work/webkit/ga/Tools/Scripts/webkitpy/style/checker.py", line 963, in do_association_check > TestExpectationsChecker.lint_test_expectations(files, self._configuration, cwd, self._increment_error_count, host=host) > File "/home/fujii/work/webkit/ga/Tools/Scripts/webkitpy/style/checkers/test_expectations.py", line 129, in lint_test_expectations > for expectations_file in port.expectations_dict().keys(): > File "/home/fujii/work/webkit/ga/Tools/Scripts/webkitpy/port/base.py", line 1124, in expectations_dict > for path in self.expectations_files(): > File "/home/fujii/work/webkit/ga/Tools/Scripts/webkitpy/port/base.py", line 1156, in expectations_files > return [self.path_to_generic_test_expectations_file()] + self._port_specific_expectations_files() > File "/home/fujii/work/webkit/ga/Tools/Scripts/webkitpy/port/darwin.py", line 56, in _port_specific_expectations_files > return list(reversed([self._filesystem.join(self._webkit_baseline_path(p), 'TestExpectations') for p in self.baseline_search_path()])) > File "/home/fujii/work/webkit/ga/Tools/Scripts/webkitpy/port/base.py", line 204, in baseline_search_path > return self.get_option('additional_platform_directory', []) + self._compare_baseline() + self.default_baseline_search_path() > File "/home/fujii/work/webkit/ga/Tools/Scripts/webkitpy/common/memoized.py", line 45, in __call__ > result = self._function(*args) > File "/home/fujii/work/webkit/ga/Tools/Scripts/webkitpy/port/ios.py", line 113, in default_baseline_search_path > '{}-{}-{}'.format(self.port_name, self.ios_version().major, wk_string), > AttributeError: 'NoneType' object has no attribute 'major' > $
Attachments
Patch (1.64 KB, patch)
2017-11-09 22:37 PST, Fujii Hironori
no flags
Fujii Hironori
Comment 1 2017-11-09 22:37:21 PST
Jonathan Bedard
Comment 2 2017-11-10 07:24:50 PST
I suspect this is on a machine without an iOS SDK installed, correct?
Aakash Jain
Comment 3 2017-11-10 08:53:23 PST
Comment on attachment 326558 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=326558&action=review > Tools/Scripts/webkitpy/port/ios_simulator.py:118 > + return Version(self.host.platform.xcode_sdk_version('iphonesimulator')) This might pass None to Version(). We should have a log statement at https://trac.webkit.org/browser/webkit/trunk/Tools/Scripts/webkitpy/common/version.py#L44 That can be done either in this patch or separate patch.
Jonathan Bedard
Comment 4 2017-11-10 09:20:35 PST
(In reply to Aakash Jain from comment #3) > Comment on attachment 326558 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=326558&action=review > > > Tools/Scripts/webkitpy/port/ios_simulator.py:118 > > + return Version(self.host.platform.xcode_sdk_version('iphonesimulator')) > > This might pass None to Version(). We should have a log statement at > https://trac.webkit.org/browser/webkit/trunk/Tools/Scripts/webkitpy/common/ > version.py#L44 > > That can be done either in this patch or separate patch. I am of the opinion this should be done in another patch. This is also a side-effect of a long-standing issue which I've just filed a bug for <https://bugs.webkit.org/show_bug.cgi?id=179534>. Maybe just a FIXME and ultimately, we address the root cause?
Jonathan Bedard
Comment 5 2017-11-10 20:13:04 PST
I'm going to land this patch so that our trees don't spend the weekend red.
WebKit Commit Bot
Comment 6 2017-11-10 20:32:45 PST
Comment on attachment 326558 [details] Patch Clearing flags on attachment: 326558 Committed r224722: <https://trac.webkit.org/changeset/224722>
WebKit Commit Bot
Comment 7 2017-11-10 20:32:46 PST
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 8 2017-11-15 09:37:31 PST
Note You need to log in before you can comment on or make changes to this bug.