summaryrefslogtreecommitdiff
path: root/TODO.rubygems
blob: 60b6ca1f6b5f8209f325e3abda012d9c56d57a22 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
RubyGems-specific improvements for the Baserock Import tool
-----------------------------------------------------------

Not all Ruby applications are packaged as RubyGems. The tool should be able
to process any directory containing a Gemfile and calculate its dependency
graph from that, even if there is no .gemspec file. A little background:
initially I was looking for an approach that works for *all* Ruby projects,
and found that if I read the Gemfile of each project the overall dependency
graph would end up being enourmous, and circular. I switched to creating a
fake Gemfile that included only the .gemspec file of the specific project
being imported. This works well for dependencies, but I've realised that the
goal project (the thing you actually want to import) should probably be
treated differently. I envisage a solution where there is a new type of
importer, named 'ruby-bundler' or some such thing, which takes a repo URL
and reads dependencies from the Gemfile inside that repo. In the
.foreign-dependencies file for the package it can list all the dependencies
as 'rubygem' rather than 'ruby-bundler' dependencies, so that they are
processed as Gems (using the .gemspec rather than the Gemfile).

If you could pass a Git ref as GEM_VERSION it might be useful. Currently you
can't do that.

The generated RubyGem chunk morphologies contain splitting rules which would
be better built into Morph so they didn't need to be specified each time.

Ideally Morph would be able to understand the normal RubyGems build system.
Sadly the current morphlib.buildsystem code makes this a bit tricky because
it's hard for the build system template to know the name of the .gemspec it
should build.

Currently the tool hardcodes the name of each chunk morphology it generates as
'strata/$stratumname/$chunkname-$version.morph'. This is more or less a
workaround for some of the issues listed below.

It's ugly to have the version number in every chunk name, and it makes it more
time-consuming to do version updates of individual components in a stratum.
The chunk name should default to '$chunkname', except when multiple versions
of the chunk are found.

The tool should autodetect where 'Hoe' is used and generate a chunk morph
that runs `rake gem` instead of `gem build xxx.gemspec`.