Closed Bug 1324041 Opened 8 years ago Closed 3 years ago

Make the MSVC version and obsolete compiler messages less redundant in test_toolchain_configure.py

Categories

(Firefox Build System :: General, defect)

defect
Not set
normal

Tracking

(firefox53 wontfix)

RESOLVED FIXED
Tracking Status
firefox53 --- wontfix

People

(Reporter: RyanVM, Unassigned)

Details

Follow-up bug from Ted's review comments in bug 1319901. There's a lot of repeated information in test_toolchain_configure.py that would be better factored-out to make future changes easier to do.

(In reply to Ted Mielczarek [:ted.mielczarek] from comment #9)
> Comment on attachment 8819153 [details] [diff] [review]
> [52+] Enforce vs2015u3 as the minimum Windows compiler version
> 
> Review of attachment 8819153 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> We sure do repeat the version number a lot around here. It'd be nice if we
> didn't have to do that.
> 
> ::: python/mozbuild/mozbuild/test/configure/test_toolchain_configure.py
> @@ +768,4 @@
> >          'See https://developer.mozilla.org/en/Windows_Build_Prerequisites')
> > +    VS_2015u2_RESULT = (
> > +        'This version (19.00.23918) of the MSVC compiler is not supported.\n'
> > +        'You must install Visual C++ 2015 Update 3 or newer in order to build.\n'
> 
> Could you factor these error messages out into a common template so we don't
> have to keep making this change every time we bump the minimum supported
> version? Like
> 
> ```
> MSVC_ERROR_TEMPLATE = ''''This version ({}) of the MSVC compiler is not
> supported.
> ...
> '''
> 
> VS_2013u2_RESULT = MSVC_ERROR_TEMPLATE.format(...)
> ```
> 
> Maybe you could stick a `.version` property on the `FakeCompiler` instances
> the `VS` function returns so you could just write `VS_2013u2.version` there:
> https://dxr.mozilla.org/mozilla-central/rev/
> 63b447888a6469b9f6ae8f76ac5f0d7c6ea239da/python/mozbuild/mozbuild/test/
> configure/test_toolchain_configure.py#200
Assignee: ryanvm → nobody
Product: Core → Firefox Build System
Bug 1424281 has some other cleanup ideas in comments 26 & 27.

Better idea - let's drop support for MSVC and nuke all of those checks.

Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.