Skip to content
This repository

Add 'Imports' to .use files? #329

Closed
nddrylliog opened this Issue · 13 comments

4 participants

Amos Wenger Friedrich Weber Marie Markwell Alexandros Naskos
Amos Wenger
Owner

I was against it a year back but now I can see how it would actually be useful.

Amos Wenger
Owner

However, as a safety measure, said Imports should be restricted to the SourcePath specified in the .use file

Friedrich Weber
Collaborator

Sounds good! Maybe use this for the "basic" modules that need to be imported in order to use the module anyway, and let the user import specific other modules by hand? Like ... Imports: mycompiler in the usefile, and import mycompiler/backend/C in the ooc files?

Amos Wenger
Owner

Something like this, yes. Well, the 'Imports:' line should support the same syntax as 'import' itself imho so a package owner could put pretty much anything in his .use file, but the intended use is only the main modules, yes.

Friedrich Weber
Collaborator

Sure! Something like Imports: mycompiler/Foo, mycompiler/Bar, mycompiler/[Gnuz,Buz] then?

Amos Wenger
Owner

Exactly.

Marie Markwell
Collaborator

Sounds good! And I'll just subtly mention #241 here since it's somewhat related... ;P

Marie Markwell
Collaborator

We have this now, don't we?

Marie Markwell
Collaborator
Imports: ruby/ruby, ruby/rubyvalue-def, ruby/ruby-def

Why yes we do. I actually use it.

Amos Wenger
Owner

@duckinator I think it wasn't closed because of that:

However, as a safety measure, said Imports should be restricted to the SourcePath specified in the .use file

But that could be another issue, you know.

Alexandros Naskos
Collaborator

@nddrylliog It is already another issue, #523

Marie Markwell
Collaborator

How convenient! Let's just pretend I actually checked for that, then. ;)

Amos Wenger
Owner

Ah, high-five to past-@nddrylliog.

Amos Wenger
Owner

So, 3 years back I was against this feature, 2 years back I warned that imports should be sandboxed, today I actually implemented sandboxing. So there you go, @duckinator, @shamanas & @fredreichbier. (And past-@nddrylliog).

(see 1d370d4)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.