Hi All,

Right now, I can run the type-checker by writing the GitHub tarball
contents to disk and using the packages.Load function to parse and
type-check the contents.

Unfortunately, all I've been able to make work at the moment with
packages.Load would entail writing the entire repository contents to
disk... only to read them back into memory... and then delete them. This
works, but it could be better.

I'm curious if anyone is aware of a way to parse and type-check multiple
packages (and making type information available to multiple packages in the
process) for source code that "lives" in memory.

I've tried using the very conspicuous Overlay field from packages.Config
and passing a map from a fake filepath to the contents of the file in
memory. I've found it challenging to find an acceptable combination of Dir
and Overlay that will make this work (if one exists).

I've also noticed that packages provides this option for external drivers
but I'm not sure it fits my use-case, since it seems like it would involve
IPC.

If I'm passionate about not writing these files to disk, is there a way I
can invoke the type-checker for multiple packages without reinventing a
large part of what packages provides?

Thanks,

K. Alex Mills

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CALJzkY8BkYumOHLV%3D01b3TFz0zsn7dsxSU4ec_kz99aecKtiBw%40mail.gmail.com.

Reply via email to