Easy way to browse Hermes packages?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Easy way to browse Hermes packages?

Alistair Grant
Hi Everyone,

Is there an easy way to browse the contents of .hermes files (from the
Pharo 7 bootstrap process)?  Or at least list the packages, classes
and methods defined within?

Thanks!
Alistair

Reply | Threaded
Open this post in threaded view
|

Re: Easy way to browse Hermes packages?

tesonep@gmail.com
Hello, 
   having the Hermes files and any Pharo7 image it is easy to inspect the Hermes package.
It only had to be read from the fileSystem. 

You can execute:

reader := HEBinaryReader new
stream: ('AST-Core.hermes' asFileReference) binaryReadStream;
yourself.


package := HEPackage readFrom: reader.


If you inspect the package you will see all the content in the Hermes file (the format allows us to have different root elements in the file, but we are exporting a package per file).
If it is useful we can include it as an inspector.

Cheers,
Pablo

On Fri, May 11, 2018 at 10:55 PM, Alistair Grant <[hidden email]> wrote:
Hi Everyone,

Is there an easy way to browse the contents of .hermes files (from the
Pharo 7 bootstrap process)?  Or at least list the packages, classes
and methods defined within?

Thanks!
Alistair




--
Pablo Tesone.
[hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Easy way to browse Hermes packages?

Alistair Grant
Hi Pablo,

Thanks! I'll take a look (my Pharo time is very limited at the moment,
unfortunately).

Cheers,
Alistair


On 12 May 2018 at 20:19, [hidden email] <[hidden email]> wrote:

> Hello,
>    having the Hermes files and any Pharo7 image it is easy to inspect the
> Hermes package.
> It only had to be read from the fileSystem.
>
> You can execute:
>
> reader := HEBinaryReader new
> stream: ('AST-Core.hermes' asFileReference) binaryReadStream;
> yourself.
>
>
> package := HEPackage readFrom: reader.
>
>
> If you inspect the package you will see all the content in the Hermes file
> (the format allows us to have different root elements in the file, but we
> are exporting a package per file).
> If it is useful we can include it as an inspector.
>
> Cheers,
> Pablo
>
> On Fri, May 11, 2018 at 10:55 PM, Alistair Grant <[hidden email]>
> wrote:
>>
>> Hi Everyone,
>>
>> Is there an easy way to browse the contents of .hermes files (from the
>> Pharo 7 bootstrap process)?  Or at least list the packages, classes
>> and methods defined within?
>>
>> Thanks!
>> Alistair
>>
>
>
>
> --
> Pablo Tesone.
> [hidden email]