Closed apotterri closed 2 years ago
Is it worth having an ignore list of classes that are known to have bad behaving to_s?
On Mon, Mar 28, 2022 at 8:36 AM Alan Potter @.***> wrote:
Calling #to_s on Rails internal classes (e.g. those used for associations) may raise an exception. Fall back to using the class name if that happens.
These changes also add a minimal Rails 7 app for testing. This app is complete enough to show that the #to_s fix works, but not enough to claim that we should claim Rails 7 support.
You can view, comment on, or merge this pull request online at:
https://github.com/applandinc/appmap-ruby/pull/235 Commit Summary
- 5f09771 https://github.com/applandinc/appmap-ruby/pull/235/commits/5f097711c5e6483b010e0c35e6f24ffc2da6b1bc fix: Rescue exceptions when calling Class#to_s
File Changes
(93 files https://github.com/applandinc/appmap-ruby/pull/235/files)
- M Rakefile https://github.com/applandinc/appmap-ruby/pull/235/files#diff-ee98e028c59b193d58fde56ab4daf54d43c486ae674e63d50ddf300b07943e0f (17)
- M lib/appmap/config.rb https://github.com/applandinc/appmap-ruby/pull/235/files#diff-b0ca8eba4336df106cde97666ff16fea18485c28580c509363d377ea3b506229 (10)
- A spec/fixtures/rails7_users_app/.dockerignore https://github.com/applandinc/appmap-ruby/pull/235/files#diff-962918be6601308b19db7fcccba30ea6517ac5039bb29edd1cabdb77ede3b196 (1)
- A spec/fixtures/rails7_users_app/.gitattributes https://github.com/applandinc/appmap-ruby/pull/235/files#diff-a8a7325134431a8f672a897a2995e523e811537d874a88e444f4d1a16f726ea2 (7)
- A spec/fixtures/rails7_users_app/.gitignore https://github.com/applandinc/appmap-ruby/pull/235/files#diff-4dfe64c2e539d428207cac1219bc17a5c9aed85a5f29ace7a22d17ef13ef3fcc (31)
- A spec/fixtures/rails7_users_app/.rspec https://github.com/applandinc/appmap-ruby/pull/235/files#diff-71e665693d5638ef8b80d0243e846613020311bc8900531f5f940e2410071f5f (1)
- A spec/fixtures/rails7_users_app/.ruby-version https://github.com/applandinc/appmap-ruby/pull/235/files#diff-96249e6531d08de03dc451eabb6a7f81c2577536b7d5a48d44338577446a67b0 (1)
- A spec/fixtures/rails7_users_app/Dockerfile https://github.com/applandinc/appmap-ruby/pull/235/files#diff-e3644c9fcfa2955040fce3d72ff3bee525ec01ff5923038dd19fa54dd5123a3b (30)
- A spec/fixtures/rails7_users_app/Dockerfile.pg https://github.com/applandinc/appmap-ruby/pull/235/files#diff-78c80423b37f25aaf1d374fb60a7e3d5de01a1edd747de986e1d56d5847259e7 (3)
- A spec/fixtures/rails7_users_app/Gemfile https://github.com/applandinc/appmap-ruby/pull/235/files#diff-be6cd94fec411584b7093375b9d27d1089284ca46c803fe41f84c07defe6d7de (101)
- A spec/fixtures/rails7_users_app/README.md https://github.com/applandinc/appmap-ruby/pull/235/files#diff-30353ef1f835499dd66269861e656822f7b8d52f3c5a08e4e50189caa257df79 (24)
- A spec/fixtures/rails7_users_app/Rakefile https://github.com/applandinc/appmap-ruby/pull/235/files#diff-9aae021da8e8e09fc968091b94dbdfbe296694a8b521c05c2ae4d17d35fc2a73 (6)
- A spec/fixtures/rails7_users_app/app/assets/config/manifest.js https://github.com/applandinc/appmap-ruby/pull/235/files#diff-b3e4389701fc615d8588481fb497055f7cf211a949220bad6d28e1ca75a623db (4)
- A spec/fixtures/rails7_users_app/app/assets/images/.keep https://github.com/applandinc/appmap-ruby/pull/235/files#diff-f9aec5c1c75031a8eb4adc9bba4606879321d44158bacabbe472476de17b926a (0)
- A spec/fixtures/rails7_users_app/app/assets/stylesheets/application.css https://github.com/applandinc/appmap-ruby/pull/235/files#diff-71a1b7ddcdf8a97eb369107cb8e0c76050e2a0451074064a76a0e14d50691d74 (15)
- A spec/fixtures/rails7_users_app/app/channels/application_cable/channel.rb https://github.com/applandinc/appmap-ruby/pull/235/files#diff-28648d340efb23871dcc90630655a815520a149b280c67af34de98d4da8e7142 (4)
- A spec/fixtures/rails7_users_app/app/channels/application_cable/connection.rb https://github.com/applandinc/appmap-ruby/pull/235/files#diff-aab09244a8c3bb92f04d561e651c578a8b43f2c4a8c64f812c9093ed778214ea (4)
- A spec/fixtures/rails7_users_app/app/controllers/application_controller.rb https://github.com/applandinc/appmap-ruby/pull/235/files#diff-3bac8f989f89a5acaffe349e898bf5b700776fc714eade7441d818347c04aad4 (2)
- A spec/fixtures/rails7_users_app/app/controllers/concerns/.keep https://github.com/applandinc/appmap-ruby/pull/235/files#diff-20c2349dd871b25f2484446161726226c01c4f51dbd78adad426d6bf8d6117e0 (0)
- A spec/fixtures/rails7_users_app/app/helpers/application_helper.rb https://github.com/applandinc/appmap-ruby/pull/235/files#diff-a5ab5b89895b6a6aa7bd636fd8f3399994a568d8300861af661f93b578fc1c57 (2)
- A spec/fixtures/rails7_users_app/app/javascript/application.js https://github.com/applandinc/appmap-ruby/pull/235/files#diff-c40362b0f8db466846072486992ccb32986c68093ff12968f49288dc12d63025 (3)
- A spec/fixtures/rails7_users_app/app/javascript/controllers/application.js https://github.com/applandinc/appmap-ruby/pull/235/files#diff-cc00ac7022dbda2ef2e4f1c2f2339367804f3164fc53f9e33bf44951a635ba6b (9)
- A spec/fixtures/rails7_users_app/app/javascript/controllers/hello_controller.js https://github.com/applandinc/appmap-ruby/pull/235/files#diff-955f4d09fe9137c8676617b96f88543787d88e41b345ebc751f693d75f148e42 (7)
- A spec/fixtures/rails7_users_app/app/javascript/controllers/index.js https://github.com/applandinc/appmap-ruby/pull/235/files#diff-841f51d5fc89aa2901df0bb92ccf8d8eee4afea5095de83c8818b4cbd8608cd2 (11)
- A spec/fixtures/rails7_users_app/app/jobs/application_job.rb https://github.com/applandinc/appmap-ruby/pull/235/files#diff-23c466fa2799c2a4072ddbf0e1bc8912baa11f1945707ac4857ce917b8290180 (7)
- A spec/fixtures/rails7_users_app/app/mailers/application_mailer.rb https://github.com/applandinc/appmap-ruby/pull/235/files#diff-2e6b0a862ecff9ae5049960442221e116eab023d6d70305721733f5d8db04440 (4)
- A spec/fixtures/rails7_users_app/app/models/application_record.rb https://github.com/applandinc/appmap-ruby/pull/235/files#diff-55da859e9ebe2d648811aa141b408b2551237fd06d8c684f9ceabacb2deb80c2 (3)
- A spec/fixtures/rails7_users_app/app/models/concerns/.keep https://github.com/applandinc/appmap-ruby/pull/235/files#diff-593ae4f7653b9a243d5c88c6f953b9799fcb8b2d9bae4fa3ca3a1313e6bdfd8e (0)
- A spec/fixtures/rails7_users_app/app/models/instance.rb https://github.com/applandinc/appmap-ruby/pull/235/files#diff-dda70963e571c44165dd65b993dc515def6ab9acee585e1b2a42d28573fa95c2 (7)
- A spec/fixtures/rails7_users_app/app/models/instructor.rb https://github.com/applandinc/appmap-ruby/pull/235/files#diff-76ca6490dcafce48ddabd2a9eb62ab59ab44d433fece5ddd07f142926abb6e7b (7)
- A spec/fixtures/rails7_users_app/app/views/layouts/application.html.erb https://github.com/applandinc/appmap-ruby/pull/235/files#diff-1fb97a10c5e30b5e0d840d9e090fd25634220a324e10738ce12991bc360add3e (16)
- A spec/fixtures/rails7_users_app/app/views/layouts/mailer.html.erb https://github.com/applandinc/appmap-ruby/pull/235/files#diff-8212ea5e30c4bf5f4b8bf37849bf0b12a224a6d05d3e9467ad22be0209b0211d (13)
- A spec/fixtures/rails7_users_app/app/views/layouts/mailer.text.erb https://github.com/applandinc/appmap-ruby/pull/235/files#diff-86c16b6170d6fe3bbc55f348568fc8a411fd4d29903202735ee6a46da5f43a9b (1)
- A spec/fixtures/rails7_users_app/appmap.yml https://github.com/applandinc/appmap-ruby/pull/235/files#diff-8c3900d7623899fce155b65d4ee22f941186ea64bcfba1f6d8c0e498ed991f32 (3)
- A spec/fixtures/rails7_users_app/bin/bundle https://github.com/applandinc/appmap-ruby/pull/235/files#diff-17567bf4e51151b05608a84241993dbae652c27452e9553fecccfeead5125c96 (114)
- A spec/fixtures/rails7_users_app/bin/importmap https://github.com/applandinc/appmap-ruby/pull/235/files#diff-db28fa5d43f650d2702541c1e257e5b8512c21872f3734141ba2d89c3c77be92 (4)
- A spec/fixtures/rails7_users_app/bin/rails https://github.com/applandinc/appmap-ruby/pull/235/files#diff-93219f023dafd17574ae4b78b1ae28cd43ab8bd4e29e1f0e8f60661157d8f273 (4)
- A spec/fixtures/rails7_users_app/bin/rake https://github.com/applandinc/appmap-ruby/pull/235/files#diff-6176f43b2a8c86487f954da74b8b715ca59d1fbecdcd2afc52325c3c94e4d70a (4)
- A spec/fixtures/rails7_users_app/bin/setup https://github.com/applandinc/appmap-ruby/pull/235/files#diff-7bb32d07749743fe050fb223db35755100ab49a3fa3e615abcb7dbd33015cda4 (33)
- A spec/fixtures/rails7_users_app/config.ru https://github.com/applandinc/appmap-ruby/pull/235/files#diff-ee072e644fbc24d29e4bf93eed617d3c4c742e23e62cd5970e1921e79c0280c2 (6)
- A spec/fixtures/rails7_users_app/config/application.rb https://github.com/applandinc/appmap-ruby/pull/235/files#diff-9c94074aaed4b1b8148c42f437a459b78e5d5751cb2036b3f0cc43e140b2c33f (22)
- A spec/fixtures/rails7_users_app/config/boot.rb https://github.com/applandinc/appmap-ruby/pull/235/files#diff-aa24ed8986fddec3e974e61f2ccc67fc334b869c9a16e2906312161868ae8b2d (4)
- A spec/fixtures/rails7_users_app/config/cable.yml https://github.com/applandinc/appmap-ruby/pull/235/files#diff-2c942c38922542a646a5e156fc97a9efbde02408b7bec4e0da418e1d623c3a05 (10)
- A spec/fixtures/rails7_users_app/config/credentials.yml.enc https://github.com/applandinc/appmap-ruby/pull/235/files#diff-fdd2713ee6ed13a5e166516a6f2332c2fe82b609928d29b08e1fbe2e420b86ef (1)
- A spec/fixtures/rails7_users_app/config/database.yml https://github.com/applandinc/appmap-ruby/pull/235/files#diff-888d9655e6e443cab0d1d7a0b0ca9c0fff187d01315df852fb650573a42a544f (86)
- A spec/fixtures/rails7_users_app/config/environment.rb https://github.com/applandinc/appmap-ruby/pull/235/files#diff-12fcd12228f58b132ee70f55279d8c66573ece6fc29280bbddbb296b2d5e0a99 (5)
- A spec/fixtures/rails7_users_app/config/environments/development.rb https://github.com/applandinc/appmap-ruby/pull/235/files#diff-03f6ad9727597059f9ce80e93b98e6f9c30c1277e7a336463782e09e79825e65 (70)
- A spec/fixtures/rails7_users_app/config/environments/production.rb https://github.com/applandinc/appmap-ruby/pull/235/files#diff-2c6c97429a9b110a9baec084ec59d3a1b9b6c83a1580b2f2bc6e65c29862a80b (93)
- A spec/fixtures/rails7_users_app/config/environments/test.rb https://github.com/applandinc/appmap-ruby/pull/235/files#diff-9475d49fa7dc7ba200e35e1d9bdfe0c3fa9acef6ed8fae719b26ab5aec602eb6 (60)
- A spec/fixtures/rails7_users_app/config/importmap.rb https://github.com/applandinc/appmap-ruby/pull/235/files#diff-d2dd285d7b1e45ed321b4466c29175cbdc10bc836e04d861301d890ceeedb7ef (7)
- A spec/fixtures/rails7_users_app/config/initializers/assets.rb https://github.com/applandinc/appmap-ruby/pull/235/files#diff-e55bb900bb592c6a8f41a8011f61ae1f4598b7cc9722ff37a94a16e2720be983 (12)
- A spec/fixtures/rails7_users_app/config/initializers/content_security_policy.rb https://github.com/applandinc/appmap-ruby/pull/235/files#diff-75d3ed79ee4d4433214233152a0d2c0f26ce64a8e083ba47a46806d1b91d595f (26)
- A spec/fixtures/rails7_users_app/config/initializers/filter_parameter_logging.rb https://github.com/applandinc/appmap-ruby/pull/235/files#diff-778d62a5938b2ae9966938649e6bb62bc27a952dcd5ca5b38bd1e37ac7e63e8f (8)
- A spec/fixtures/rails7_users_app/config/initializers/inflections.rb https://github.com/applandinc/appmap-ruby/pull/235/files#diff-ccd93dd6f6408550fb1dc9b15e2511eeaa43995afe6b48c74d08962ad8f2eb0e (16)
- A spec/fixtures/rails7_users_app/config/initializers/permissions_policy.rb https://github.com/applandinc/appmap-ruby/pull/235/files#diff-e1995321791fbacb26177efa00bc4302fb2cd1c6aad775c37d08ad4ede07e89c (11)
- A spec/fixtures/rails7_users_app/config/locales/en.yml https://github.com/applandinc/appmap-ruby/pull/235/files#diff-e6f7c88fdc529ee6cd30c95d3ae42d066560d0c83698c48a1fef303d785ee328 (33)
- A spec/fixtures/rails7_users_app/config/puma.rb https://github.com/applandinc/appmap-ruby/pull/235/files#diff-b50697bb055ec2e4c20a0d6e204fc9f56ab963427e9011f65205fb4bdecfb046 (43)
- A spec/fixtures/rails7_users_app/config/routes.rb https://github.com/applandinc/appmap-ruby/pull/235/files#diff-a2e7c036a26540a4f9e8d2c3dd3c2d8889f45a3b4dcd80d82036506612516054 (6)
- A spec/fixtures/rails7_users_app/config/storage.yml https://github.com/applandinc/appmap-ruby/pull/235/files#diff-578c4e9280ed2205aaef301336d020b2555c278d6f6cc1e3da1ff03ba75b159e (34)
- A spec/fixtures/rails7_users_app/create_app https://github.com/applandinc/appmap-ruby/pull/235/files#diff-754be49a72dddd322fff8e9add5ade9e256d2b7cf270b3054bbc01506092c64c (31)
- A spec/fixtures/rails7_users_app/db/migrate/20220328093141_create_instances.rb https://github.com/applandinc/appmap-ruby/pull/235/files#diff-577de5ebab72bba286d53db5b35a132a7501ec7de8f604675fd506943046fcae (8)
- A spec/fixtures/rails7_users_app/db/migrate/20220328093154_create_instructors.rb https://github.com/applandinc/appmap-ruby/pull/235/files#diff-9ff16defba435431f345eef387d763cfbd41706f1e9423fca24cfaa841551deb (8)
- A spec/fixtures/rails7_users_app/db/schema.rb https://github.com/applandinc/appmap-ruby/pull/235/files#diff-5a16f9bec7a393fda0182255f82db4d66f93016ab0ff1995269c877b2fc5ee03 (27)
- A spec/fixtures/rails7_users_app/db/seeds.rb https://github.com/applandinc/appmap-ruby/pull/235/files#diff-38643e3ba5205e498886f9a4b9ecaf4e2ccc2147746bc9c21938498e80ef6501 (7)
- A spec/fixtures/rails7_users_app/docker-compose.yml https://github.com/applandinc/appmap-ruby/pull/235/files#diff-794a8ce6a6d377a49220df85759a07f8505eef8e105daeaaff9eef2bccedae87 (31)
- A spec/fixtures/rails7_users_app/lib/assets/.keep https://github.com/applandinc/appmap-ruby/pull/235/files#diff-718acbfb53d31e6d4079f0168f322af9eef49fc9678d79b40548ce5d1d786b7a (0)
- A spec/fixtures/rails7_users_app/lib/tasks/.keep https://github.com/applandinc/appmap-ruby/pull/235/files#diff-ac17083c9bf1e087902ec06324bd7cffcf244d5408f8d67681b26c66d807dfd2 (0)
- A spec/fixtures/rails7_users_app/log/.keep https://github.com/applandinc/appmap-ruby/pull/235/files#diff-376759bcdae0a6343ea185882c92bfec2dad60c159d9a40100abaef9e5a82f33 (0)
- A spec/fixtures/rails7_users_app/public/404.html https://github.com/applandinc/appmap-ruby/pull/235/files#diff-cf1ea04b1d2cb18cd294ad0e4ad77b6f021f6d34d85dcd0a04e9e18f3f50ad5f (67)
- A spec/fixtures/rails7_users_app/public/422.html https://github.com/applandinc/appmap-ruby/pull/235/files#diff-638687b8fc3d27ce02c63b7180570ed30379a30dbbb2dee4afbb55d1707de02a (67)
- A spec/fixtures/rails7_users_app/public/500.html https://github.com/applandinc/appmap-ruby/pull/235/files#diff-bbf8c8dab1c3472a677dd13aef335582a78de9ebfa7d24950ab8ad317cc887ba (66)
- A spec/fixtures/rails7_users_app/public/apple-touch-icon-precomposed.png https://github.com/applandinc/appmap-ruby/pull/235/files#diff-868f065d0b6cc06ccc94c0d3260923aadae2135054f78dfeb8f3a23535a18829 (0)
- A spec/fixtures/rails7_users_app/public/apple-touch-icon.png https://github.com/applandinc/appmap-ruby/pull/235/files#diff-092a9f631ff5e98123dca1574f19de181b2dd5e6aa06d77b957553e1b4368f07 (0)
- A spec/fixtures/rails7_users_app/public/favicon.ico https://github.com/applandinc/appmap-ruby/pull/235/files#diff-b614b2194a328341e36605667caadabfd167d591472d1dde40891f834227fc7d (0)
- A spec/fixtures/rails7_users_app/public/robots.txt https://github.com/applandinc/appmap-ruby/pull/235/files#diff-82a11be3a3f3038ad5b93e6b2c5fd365ae15ead98b4b10aacd276c2562e9a249 (1)
- A spec/fixtures/rails7_users_app/storage/.keep https://github.com/applandinc/appmap-ruby/pull/235/files#diff-90e1d23b013901dc72d706b9e0c829fb190825932a5a00aae95404a8bc7291b4 (0)
- A spec/fixtures/rails7_users_app/test/application_system_test_case.rb https://github.com/applandinc/appmap-ruby/pull/235/files#diff-3fc60969605b8d3b8f7ff0bd85e50b586500efc90e689d1d6f2abd8d1ed0b70a (5)
- A spec/fixtures/rails7_users_app/test/channels/application_cable/connection_test.rb https://github.com/applandinc/appmap-ruby/pull/235/files#diff-7e471b08c8725e0788f9a375f064719d0f3ee82790adb55b1cecc416ddccf26d (11)
- A spec/fixtures/rails7_users_app/test/controllers/.keep https://github.com/applandinc/appmap-ruby/pull/235/files#diff-60974a50130208c0f54eb031098873fbae50c111fae683fb9fe7a6a5eeba25d3 (0)
- A spec/fixtures/rails7_users_app/test/fixtures/files/.keep https://github.com/applandinc/appmap-ruby/pull/235/files#diff-57a6a314c21f6f6d67465ef57747f200426212a4d6de6cf54ded1517295acf3a (0)
- A spec/fixtures/rails7_users_app/test/fixtures/instances.yml https://github.com/applandinc/appmap-ruby/pull/235/files#diff-306d72876e608e89521cb84a02a802fb08ff6026600df1a41af345a44c0d4448 (11)
- A spec/fixtures/rails7_users_app/test/fixtures/instructors.yml https://github.com/applandinc/appmap-ruby/pull/235/files#diff-13daea2f83e33ab9221090fd35a765d9b09786023b824f31520e12640b4d5a28 (11)
- A spec/fixtures/rails7_users_app/test/helpers/.keep https://github.com/applandinc/appmap-ruby/pull/235/files#diff-dde777acafc2935405bdb0f46fd8b31b32cbf15a5ea3577d6de9da4d3e1915ea (0)
- A spec/fixtures/rails7_users_app/test/integration/.keep https://github.com/applandinc/appmap-ruby/pull/235/files#diff-2f13e4c38236c2d31331a3e84ce374611991878c9e97410c61f445b9c6a851ca (0)
- A spec/fixtures/rails7_users_app/test/mailers/.keep https://github.com/applandinc/appmap-ruby/pull/235/files#diff-4652ff19aa3d7e3979ba3456cb729106431f8d2b3662bdbb1c401ecf7ebeffea (0)
- A spec/fixtures/rails7_users_app/test/models/.keep https://github.com/applandinc/appmap-ruby/pull/235/files#diff-2d1ced4540df0c5b6d3e1b88529191ccf171681eff18801c7e07920ab04ca6fc (0)
- A spec/fixtures/rails7_users_app/test/models/instance_test.rb https://github.com/applandinc/appmap-ruby/pull/235/files#diff-dd383ac5e6a0c7b0b7dbe951fd4d67a8ab965d0b1cf6da50d910f8285f26e82a (6)
- A spec/fixtures/rails7_users_app/test/models/instructor_test.rb https://github.com/applandinc/appmap-ruby/pull/235/files#diff-876ed54ef450514405aa8972947227bbfe5a097e32a05cb6720254d1c3e9bed7 (7)
- A spec/fixtures/rails7_users_app/test/system/.keep https://github.com/applandinc/appmap-ruby/pull/235/files#diff-f7894ec87e8d8caaea3422324eded0231b08c4187a6d35ff09662b585bbc0da7 (0)
- A spec/fixtures/rails7_users_app/test/test_helper.rb https://github.com/applandinc/appmap-ruby/pull/235/files#diff-efc04b01b5e16c5e41cc8a6db5be23d689239d83f446c13897258e50f011e374 (13)
- M spec/rails_recording_spec.rb https://github.com/applandinc/appmap-ruby/pull/235/files#diff-c88269da477457a7400bb1628b2cd442d95310aa74addb834ca7026a0da8fe39 (6)
- M spec/rails_spec_helper.rb https://github.com/applandinc/appmap-ruby/pull/235/files#diff-75ebb8463e260ecc0c186434e166f9e629fe7302650c72e2c707ffbdcb52e978 (7)
- A spec/rails_test_spec.rb https://github.com/applandinc/appmap-ruby/pull/235/files#diff-266ababbb31a29eccca8eef38e03b45e86b8d39802f06f2f4b611ed51aabf324 (37)
Patch Links:
- https://github.com/applandinc/appmap-ruby/pull/235.patch
- https://github.com/applandinc/appmap-ruby/pull/235.diff
— Reply to this email directly, view it on GitHub https://github.com/applandinc/appmap-ruby/pull/235, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAVC635SKVHC3HMNLZWEIDVCGRTRANCNFSM5R3ACJYQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>
:tada: This PR is included in version 0.77.3 :tada:
The release is available on:
v0.77.3
Your semantic-release bot :package::rocket:
Calling #to_s on Rails internal classes (e.g. those used for associations) may raise an exception. Fall back to using the class name if that happens.
These changes also add a minimal Rails 7 app for testing. This app is complete enough to show that the #to_s fix works, but not enough to claim that we should claim Rails 7 support.
Fixes #226.