Open RobertDober opened 2 months ago
Hello, we have also issues around homepage link : We updated the homepage link in a gem and, after build and publish, the change is not reflecting on the Rubygems page. The homepage still point to https://github.com/cotag/couchbase-orm whereas the gemspec point to https://github.com/Couchbase-Ecosystem/couchbase-ruby-orm .
I confirm I get links updated with metadata.
I looked into this and I think it's a rubygems.org bug. My investigation shows that the line that it's supposed to update this field is this one:
However, it never runs because version.reload.latest?
is never true
. The gem is supposed to get latest: true
thanks to an after_save :reorder_versions
hook in the Version
model that runs this code here:
However, that only updates versions that have already been indexed, and that's done by the AfterVersionWrite
job which has not even been enqueued yet:
Some potential ways to fix it:
metadata["homepage_uri"]
instead works.Transfering to rubygems.org!
Also this comment by @sonalkr132 explains the motivation for the current state of things. Linkset was previously set by a UI form, so it makes sense that it was linked to the whole gem, not to specific versions.
Not super trivial but I think the best way forward would be to migrate Linkset
table to be linked to a specific version instead of being linked to the gem. Actually, we may not even need to fill in a separate table anymore at all if there are no longer any views/controllers/etc using it, and we can instead backfill version metadata with fallbacks if not explicitly present in the specification?
@deivid-rodriguez indeed this is caused by never finished migration.
:information_source: In case it's of interest, I'm hitting the problem too. The source code for my Pipeable gem is correct but the RubyGems homepage link is not.
In looking at this problem more, I have few more questions/concerns that are semi-related to what Samual brought up in this issue (mentioned above) in terms of confusing UI and what's being discussed in this current issue in terms of confusing gemspec attributes because the use of homepage
and homepage_uri
metadata is still confusing. For illustration purposes, I'm going to focus on gem building since that's the fastest way to illustrate what I'm seeing. Consider the following demo.gemspec
:
Running gem build demo.gemspec
results in no warnings:
Successfully built RubyGem
Name: demo
Version: 0.0.0
File: demo-0.0.0.gem
If you delete spec.homepage
and define homepage_uri
metadata instead and then run gem build demo.gemspec
, you'll get:
WARNING: no homepage specified
WARNING: You have specified the uri:
https://demo.io/projects/demo
for all of the following keys:
homepage_uri
documentation_uri
Only the first one will be shown on rubygems.org
If you delete spec.homepage
and documentation_uri
metadata but keep the homepage_uri
metadata and run gem build demo.gemspec
, you'll get:
WARNING: no homepage specified
In all the above, your gem will be built but the only way to not get warnings is to specify spec.homepage
but then you end up with the RubyGems UI not being update appropriately. All of this is to say, that it seems like two problems are at play here:
homepage
but, I guess allow, homepage_uri
to override? This seems confusing and feels like an error should be raised if both homepage
and homepage_uri
are present where use of homepage
should be encouraged.documentation_uri
and homepage/homepage_uri
since it's reasonable to have the same and/or different URIs but it might be worth denoting, visually, that they are the same with a "SAME" badge next to the URIs within the RubyGems page so folks aren't confused?Anyway, some thoughts. If this should be broken into a separate issue, I can do that too.
Describe the problem as clearly as you can
When I specify a codeberg url in the homepage entry of my gemspec as in the
simple_args
gemthen it cannot be seen on the gem's page
Did you try upgrading RubyGems?
indeed
Post steps to reproduce the problem
just use a codeberg url for the homepage entry see example above and run....
Which command did you run?
gem build gem push
What were you expecting to happen?
What actually happened?
See above
Run
gem env
and paste the output below