Ticket #1290 (new feature)

Opened 12 years ago

Last modified 11 years ago

Produce Single PBC from Multiple PIR Files with -o

Reported by: chromatic Owned by:
Priority: normal Milestone:
Component: core Version:
Severity: medium Keywords:
Cc: Language:
Patch status: Platform:

Description

After discussing the idea with Allison, we both believe that Parrot should be able to produce a single PBC file from a command like:

parrot -o all_files.pbc file1.pir file2.pir ... filen.pir

-- c

Change History

  Changed 12 years ago by coke

  Changed 12 years ago by coke

Further discussion on the original ticket points at pbc_merge as a potential alternative; There were some worries about multiple :loads per single file, but that doesn't seem to be an issue.

Other discussion on the ticket suggested using (instead of a pbc_merge-style tool) a package format. (e.g. zip/jar, etc.) It's possible that that could obviate the original need for pbc_merge, even.

in reply to: ↑ description   Changed 12 years ago by pmichaud

+1

Pm

  Changed 11 years ago by jkeenan

Is this RFC still under consideration? If so, which direction do we expect to take?

kid51

  Changed 11 years ago by jkeenan

  • component changed from none to core

follow-up: ↓ 7   Changed 11 years ago by cotto

  • type changed from RFC to feature

+1. It's definitely not a high-priority feature, though, since pbc_merge makes it possible to do the same thing, if less efficiently.

in reply to: ↑ 6   Changed 11 years ago by jkeenan

Replying to cotto:

+1. It's definitely not a high-priority feature, though, since pbc_merge makes it possible to do the same thing, if less efficiently.

What would it take to do it? Whom could we ask to work on it?

  Changed 11 years ago by whiteknight

We would need to rework the command-line parsing logic to handle multiple input files if the -o option were used (I suspect listing multiple input files without -o should be treated as an error because it's nonsensical). We would need to compile each, merge each one into a single master packfile, and then output that packfile to file. With the new embedding API and some of the IMCC/Packfile changes recently, this actually should not be too hard of a project.

The question is whether we want to do this with pbc_merge available. And, if so, do we want to keep pbc_merge or deprecate that?

  Changed 11 years ago by coke

On Mon, May 23, 2011 at 11:10 AM, Parrot
<parrot-tickets@lists.parrot.org> wrote:
> #1290: Produce Single PBC from Multiple PIR Files with -o
> -----------------------+----------------------------------------------------
>  Reporter:  chromatic  |       Owner:
>     Type:  feature    |      Status:  new
>  Priority:  normal     |   Milestone:
> Component:  core       |     Version:
>  Severity:  medium     |    Keywords:
>     Lang:             |       Patch:
>  Platform:             |
> -----------------------+----------------------------------------------------
>
> Comment(by whiteknight):
>
>  We would need to rework the command-line parsing logic to handle multiple
>  input files if the -o option were used (I suspect listing multiple input
>  files without -o should be treated as an error because it's nonsensical).
>  We would need to compile each, merge each one into a single master
>  packfile, and then output that packfile to file. With the new embedding
>  API and some of the IMCC/Packfile changes recently, this actually should
>  not be too hard of a project.
>
>  The question is whether we want to do this with pbc_merge available. And,
>  if so, do we want to keep pbc_merge or deprecate that?

FYI, pbc_merge merges already-generated PBC files, which is different
than the request on this ticket (to generate a single PBC from
multiple PIR files.)

As long as the functionality is still there, I don't care which way I
have to invoke it (barring normal deprecation issues.)

-- 
Will "Coke" Coleda

  Changed 11 years ago by pmichaud

On Mon, May 23, 2011 at 12:38:16PM -0400, Will Coleda wrote:
> FYI, pbc_merge merges already-generated PBC files, which is different
> than the request on this ticket (to generate a single PBC from
> multiple PIR files.)
> 
> As long as the functionality is still there, I don't care which way I
> have to invoke it (barring normal deprecation issues.)

The workaround I've used in nearly every project I've done is to
create a PIR file with .include directives for the files to
be combined as one.  In other words, all_files.pir can contain

    .include 'file1.pir'
    .include 'file2.pir'
    ...
    .include 'filen.pir'

and then the parrot command to compile them together is

    parrot -o all_files.pbc all_files.pir

Of course, the workaround doesn't address the request on this
ticket directly, but it's how I've managed to achieve the same
result since pretty much my first days working with Parrot.

Pm

Note: See TracTickets for help on using tickets.