[PATCH] D68779: [LNT][NFC] Fix global import in function

Matthias Braun via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 12 13:52:22 PST 2019


(Note: I'm not actively working in LLVM or LNT anymore)

I don't think there was a deep reason, I think it was because LNT had these two sets of requirements for server or client. And the idea was that people installing just the "client" part would not need to install a ton of packages, which meant you had to import some things lazily short of extending the requirements list for the lightweight client install...

- Matthias

> On Nov 12, 2019, at 2:19 AM, Thomas Preud'homme via Phabricator <reviews at reviews.llvm.org> wrote:
> 
> thopre added a subscriber: MatzeB.
> thopre added a comment.
> 
> In D68779#1741077 <https://reviews.llvm.org/D68779#1741077>, @thopre wrote:
> 
>> In D68779#1741055 <https://reviews.llvm.org/D68779#1741055>, @cmatthews wrote:
>> 
>>> I don't understand why we are not using normal import at the top level here?
>> 
>> 
>> According to a comment in the file it's done this way to load dependencies lazily. It does not say why it is desirable to do so though. Since the same dependencies are loaded for all admin subcommand I'd say it's probably not necessary but I'd prefer to fix that in a separate patch once all Python 3 support patches are in to keep this one a NFC.
> 
> 
> @MatzeB Can you confirm what is the purpose of loading lnt admin dependencies lazily?
> 
> 
> CHANGES SINCE LAST ACTION
>  https://reviews.llvm.org/D68779/new/
> 
> https://reviews.llvm.org/D68779
> 
> 
> 



More information about the llvm-commits mailing list