You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@whimsical.apache.org by sebb <se...@gmail.com> on 2021/08/07 12:43:28 UTC

Drop Gem packaging code for whimsy

AFAICT it is not necessary for the whimsy library code to be packaged as a Gem.

However there is still some code relating to the packaging.
This may or may not still work.

I think it would be best to drop the code to reduce the burden on
future maintainers.

Sebb

Re: Drop Gem packaging code for whimsy

Posted by Sam Ruby <ru...@intertwingly.net>.
On Sat, Aug 7, 2021 at 6:12 PM sebb <se...@gmail.com> wrote:
>
> On Sat, 7 Aug 2021 at 19:53, sebb <se...@gmail.com> wrote:
> >
> > On Sat, 7 Aug 2021 at 18:58, Sam Ruby <ru...@intertwingly.net> wrote:
> > >
> > > On Sat, Aug 7, 2021 at 1:10 PM sebb <se...@gmail.com> wrote:
> > > >
> > > > On Sat, 7 Aug 2021 at 17:42, Sam Ruby <ru...@intertwingly.net> wrote:
> > > > >
> > > > > On Sat, Aug 7, 2021 at 11:46 AM sebb <se...@gmail.com> wrote:
> > > > > >
> > > > > > On Sat, 7 Aug 2021 at 16:28, Sam Ruby <ru...@intertwingly.net> wrote:
> > > > > > >
> > > > > > > The 'gem' lines with path values in Gemfiles are effectively a way to
> > > > > > > add another part of the source tree to the ruby lib path.
> > > > > >
> > > > > > But is the Gem packaging code still needed for Whimsy?
> > > > >
> > > > > Indeed, there is no need to package the gem.  There may be a few rare
> > > > > cases where it was useful for bootstrapping (setupmymac, docker), but
> > > > > those can be addressed by other (and frankly better) ways.
> > > > >
> > > > > > I've created a branch to work on this.
> > > > > > It mostly works, but it looks like some code which was previously
> > > > > > pulled in by the Whimsy gem needs to be explicitly referenced.
> > > > >
> > > > > That's what the 'gem' lines with path values in Gemfiles do.  Those
> > > > > lines either need to be restored, or another way to achieve this needs
> > > > > to be created.
> > > >
> > > > The lines I removed from the Gemfiles referred to the 'whimsy-asf' gem.
> > > > Does that not need to exist?
> > >
> > > It does not need to exist as a published or installed gem.  Take a
> > > look at the Gemfile.lock file that is produced by bundle
> > > install/update.
> > >
> > > > AFAICT the branch I created does work; it is only Travis that has problems.
> > >
> > > I'm not so sure about that.  Anything that references bundler will
> > > cause bundle to rewrite your ruby library path.  You probably can get
> > > CGis to avoid referencing bundler, but I doubt that you can get
> > > passenger applications to do so.
> >
> > I already tried several Passenger apps, and they originally failed.
> > But when I added the following to config.ru they worked:
> > $LOAD_PATH.unshift '/srv/whimsy/lib'
> > I also had to add a dependency on ruby-ldap to Gemfile.
> >
> >
> > > And Travis probably does so too, by
> > > default.
> > >
> > > It is probably best to continue with having all dependencies in the
> > > Gemfile, including path references to the lib directory.
> >
> > However that seems that only works if asf.gemspec and asf.version are present.
> > I was hoping to drop those two to avoid maintaining them.
>
> I have now got Travis to work.
> It needed LOAD_PATH adjustments in a couple of places.
>
> I tried all the Passenger apps in a Docker build and they started OK.
> I suppose it's possible that there may be one or two missing Gemfile
> dependencies that were previously provided by transitive dependencies
> of the Whimsy pseudo Gem, as was the case for ruby-ldap.

Any such errors will likely be found quickly and produce reasonable
diagnostics indicating what dependency needs to be added.

+0 on merging whenever you feel ready.

- Sam Ruby

Re: Drop Gem packaging code for whimsy

Posted by sebb <se...@gmail.com>.
On Sat, 7 Aug 2021 at 19:53, sebb <se...@gmail.com> wrote:
>
> On Sat, 7 Aug 2021 at 18:58, Sam Ruby <ru...@intertwingly.net> wrote:
> >
> > On Sat, Aug 7, 2021 at 1:10 PM sebb <se...@gmail.com> wrote:
> > >
> > > On Sat, 7 Aug 2021 at 17:42, Sam Ruby <ru...@intertwingly.net> wrote:
> > > >
> > > > On Sat, Aug 7, 2021 at 11:46 AM sebb <se...@gmail.com> wrote:
> > > > >
> > > > > On Sat, 7 Aug 2021 at 16:28, Sam Ruby <ru...@intertwingly.net> wrote:
> > > > > >
> > > > > > The 'gem' lines with path values in Gemfiles are effectively a way to
> > > > > > add another part of the source tree to the ruby lib path.
> > > > >
> > > > > But is the Gem packaging code still needed for Whimsy?
> > > >
> > > > Indeed, there is no need to package the gem.  There may be a few rare
> > > > cases where it was useful for bootstrapping (setupmymac, docker), but
> > > > those can be addressed by other (and frankly better) ways.
> > > >
> > > > > I've created a branch to work on this.
> > > > > It mostly works, but it looks like some code which was previously
> > > > > pulled in by the Whimsy gem needs to be explicitly referenced.
> > > >
> > > > That's what the 'gem' lines with path values in Gemfiles do.  Those
> > > > lines either need to be restored, or another way to achieve this needs
> > > > to be created.
> > >
> > > The lines I removed from the Gemfiles referred to the 'whimsy-asf' gem.
> > > Does that not need to exist?
> >
> > It does not need to exist as a published or installed gem.  Take a
> > look at the Gemfile.lock file that is produced by bundle
> > install/update.
> >
> > > AFAICT the branch I created does work; it is only Travis that has problems.
> >
> > I'm not so sure about that.  Anything that references bundler will
> > cause bundle to rewrite your ruby library path.  You probably can get
> > CGis to avoid referencing bundler, but I doubt that you can get
> > passenger applications to do so.
>
> I already tried several Passenger apps, and they originally failed.
> But when I added the following to config.ru they worked:
> $LOAD_PATH.unshift '/srv/whimsy/lib'
> I also had to add a dependency on ruby-ldap to Gemfile.
>
>
> > And Travis probably does so too, by
> > default.
> >
> > It is probably best to continue with having all dependencies in the
> > Gemfile, including path references to the lib directory.
>
> However that seems that only works if asf.gemspec and asf.version are present.
> I was hoping to drop those two to avoid maintaining them.

I have now got Travis to work.
It needed LOAD_PATH adjustments in a couple of places.

I tried all the Passenger apps in a Docker build and they started OK.
I suppose it's possible that there may be one or two missing Gemfile
dependencies that were previously provided by transitive dependencies
of the Whimsy pseudo Gem, as was the case for ruby-ldap.

> > - Sam Ruby

Re: Drop Gem packaging code for whimsy

Posted by sebb <se...@gmail.com>.
On Sat, 7 Aug 2021 at 18:58, Sam Ruby <ru...@intertwingly.net> wrote:
>
> On Sat, Aug 7, 2021 at 1:10 PM sebb <se...@gmail.com> wrote:
> >
> > On Sat, 7 Aug 2021 at 17:42, Sam Ruby <ru...@intertwingly.net> wrote:
> > >
> > > On Sat, Aug 7, 2021 at 11:46 AM sebb <se...@gmail.com> wrote:
> > > >
> > > > On Sat, 7 Aug 2021 at 16:28, Sam Ruby <ru...@intertwingly.net> wrote:
> > > > >
> > > > > The 'gem' lines with path values in Gemfiles are effectively a way to
> > > > > add another part of the source tree to the ruby lib path.
> > > >
> > > > But is the Gem packaging code still needed for Whimsy?
> > >
> > > Indeed, there is no need to package the gem.  There may be a few rare
> > > cases where it was useful for bootstrapping (setupmymac, docker), but
> > > those can be addressed by other (and frankly better) ways.
> > >
> > > > I've created a branch to work on this.
> > > > It mostly works, but it looks like some code which was previously
> > > > pulled in by the Whimsy gem needs to be explicitly referenced.
> > >
> > > That's what the 'gem' lines with path values in Gemfiles do.  Those
> > > lines either need to be restored, or another way to achieve this needs
> > > to be created.
> >
> > The lines I removed from the Gemfiles referred to the 'whimsy-asf' gem.
> > Does that not need to exist?
>
> It does not need to exist as a published or installed gem.  Take a
> look at the Gemfile.lock file that is produced by bundle
> install/update.
>
> > AFAICT the branch I created does work; it is only Travis that has problems.
>
> I'm not so sure about that.  Anything that references bundler will
> cause bundle to rewrite your ruby library path.  You probably can get
> CGis to avoid referencing bundler, but I doubt that you can get
> passenger applications to do so.

I already tried several Passenger apps, and they originally failed.
But when I added the following to config.ru they worked:
$LOAD_PATH.unshift '/srv/whimsy/lib'
I also had to add a dependency on ruby-ldap to Gemfile.


> And Travis probably does so too, by
> default.
>
> It is probably best to continue with having all dependencies in the
> Gemfile, including path references to the lib directory.

However that seems that only works if asf.gemspec and asf.version are present.
I was hoping to drop those two to avoid maintaining them.

> - Sam Ruby

Re: Drop Gem packaging code for whimsy

Posted by Sam Ruby <ru...@intertwingly.net>.
On Sat, Aug 7, 2021 at 1:10 PM sebb <se...@gmail.com> wrote:
>
> On Sat, 7 Aug 2021 at 17:42, Sam Ruby <ru...@intertwingly.net> wrote:
> >
> > On Sat, Aug 7, 2021 at 11:46 AM sebb <se...@gmail.com> wrote:
> > >
> > > On Sat, 7 Aug 2021 at 16:28, Sam Ruby <ru...@intertwingly.net> wrote:
> > > >
> > > > The 'gem' lines with path values in Gemfiles are effectively a way to
> > > > add another part of the source tree to the ruby lib path.
> > >
> > > But is the Gem packaging code still needed for Whimsy?
> >
> > Indeed, there is no need to package the gem.  There may be a few rare
> > cases where it was useful for bootstrapping (setupmymac, docker), but
> > those can be addressed by other (and frankly better) ways.
> >
> > > I've created a branch to work on this.
> > > It mostly works, but it looks like some code which was previously
> > > pulled in by the Whimsy gem needs to be explicitly referenced.
> >
> > That's what the 'gem' lines with path values in Gemfiles do.  Those
> > lines either need to be restored, or another way to achieve this needs
> > to be created.
>
> The lines I removed from the Gemfiles referred to the 'whimsy-asf' gem.
> Does that not need to exist?

It does not need to exist as a published or installed gem.  Take a
look at the Gemfile.lock file that is produced by bundle
install/update.

> AFAICT the branch I created does work; it is only Travis that has problems.

I'm not so sure about that.  Anything that references bundler will
cause bundle to rewrite your ruby library path.  You probably can get
CGis to avoid referencing bundler, but I doubt that you can get
passenger applications to do so.  And Travis probably does so too, by
default.

It is probably best to continue with having all dependencies in the
Gemfile, including path references to the lib directory.

- Sam Ruby

Re: Drop Gem packaging code for whimsy

Posted by sebb <se...@gmail.com>.
On Sat, 7 Aug 2021 at 17:42, Sam Ruby <ru...@intertwingly.net> wrote:
>
> On Sat, Aug 7, 2021 at 11:46 AM sebb <se...@gmail.com> wrote:
> >
> > On Sat, 7 Aug 2021 at 16:28, Sam Ruby <ru...@intertwingly.net> wrote:
> > >
> > > The 'gem' lines with path values in Gemfiles are effectively a way to
> > > add another part of the source tree to the ruby lib path.
> >
> > But is the Gem packaging code still needed for Whimsy?
>
> Indeed, there is no need to package the gem.  There may be a few rare
> cases where it was useful for bootstrapping (setupmymac, docker), but
> those can be addressed by other (and frankly better) ways.
>
> > I've created a branch to work on this.
> > It mostly works, but it looks like some code which was previously
> > pulled in by the Whimsy gem needs to be explicitly referenced.
>
> That's what the 'gem' lines with path values in Gemfiles do.  Those
> lines either need to be restored, or another way to achieve this needs
> to be created.

The lines I removed from the Gemfiles referred to the 'whimsy-asf' gem.
Does that not need to exist?

AFAICT the branch I created does work; it is only Travis that has problems.

> - Sam Ruby
>
> > > On Sat, Aug 7, 2021 at 8:43 AM sebb <se...@gmail.com> wrote:
> > > >
> > > > AFAICT it is not necessary for the whimsy library code to be packaged as a Gem.
> > > >
> > > > However there is still some code relating to the packaging.
> > > > This may or may not still work.
> > > >
> > > > I think it would be best to drop the code to reduce the burden on
> > > > future maintainers.
> > > >
> > > > Sebb

Re: Drop Gem packaging code for whimsy

Posted by Sam Ruby <ru...@intertwingly.net>.
On Sat, Aug 7, 2021 at 11:46 AM sebb <se...@gmail.com> wrote:
>
> On Sat, 7 Aug 2021 at 16:28, Sam Ruby <ru...@intertwingly.net> wrote:
> >
> > The 'gem' lines with path values in Gemfiles are effectively a way to
> > add another part of the source tree to the ruby lib path.
>
> But is the Gem packaging code still needed for Whimsy?

Indeed, there is no need to package the gem.  There may be a few rare
cases where it was useful for bootstrapping (setupmymac, docker), but
those can be addressed by other (and frankly better) ways.

> I've created a branch to work on this.
> It mostly works, but it looks like some code which was previously
> pulled in by the Whimsy gem needs to be explicitly referenced.

That's what the 'gem' lines with path values in Gemfiles do.  Those
lines either need to be restored, or another way to achieve this needs
to be created.

- Sam Ruby

> > On Sat, Aug 7, 2021 at 8:43 AM sebb <se...@gmail.com> wrote:
> > >
> > > AFAICT it is not necessary for the whimsy library code to be packaged as a Gem.
> > >
> > > However there is still some code relating to the packaging.
> > > This may or may not still work.
> > >
> > > I think it would be best to drop the code to reduce the burden on
> > > future maintainers.
> > >
> > > Sebb

Re: Drop Gem packaging code for whimsy

Posted by sebb <se...@gmail.com>.
On Sat, 7 Aug 2021 at 16:28, Sam Ruby <ru...@intertwingly.net> wrote:
>
> The 'gem' lines with path values in Gemfiles are effectively a way to
> add another part of the source tree to the ruby lib path.

But is the Gem packaging code still needed for Whimsy?

I've created a branch to work on this.
It mostly works, but it looks like some code which was previously
pulled in by the Whimsy gem needs to be explicitly referenced.


> - Sam Ruby
>
> On Sat, Aug 7, 2021 at 8:43 AM sebb <se...@gmail.com> wrote:
> >
> > AFAICT it is not necessary for the whimsy library code to be packaged as a Gem.
> >
> > However there is still some code relating to the packaging.
> > This may or may not still work.
> >
> > I think it would be best to drop the code to reduce the burden on
> > future maintainers.
> >
> > Sebb

Re: Drop Gem packaging code for whimsy

Posted by Sam Ruby <ru...@intertwingly.net>.
The 'gem' lines with path values in Gemfiles are effectively a way to
add another part of the source tree to the ruby lib path.

- Sam Ruby

On Sat, Aug 7, 2021 at 8:43 AM sebb <se...@gmail.com> wrote:
>
> AFAICT it is not necessary for the whimsy library code to be packaged as a Gem.
>
> However there is still some code relating to the packaging.
> This may or may not still work.
>
> I think it would be best to drop the code to reduce the burden on
> future maintainers.
>
> Sebb