Skip to content

Version 1.4.0 (renamed to v2.0.0)#29

Closed
lecoqlibre wants to merge 1 commit into
mainfrom
v1.4.0
Closed

Version 1.4.0 (renamed to v2.0.0)#29
lecoqlibre wants to merge 1 commit into
mainfrom
v1.4.0

Conversation

@lecoqlibre

Copy link
Copy Markdown
Member

No description provided.

@lecoqlibre lecoqlibre requested a review from mkllnk April 21, 2026 12:24
@lecoqlibre lecoqlibre self-assigned this Apr 21, 2026
@lecoqlibre lecoqlibre changed the title Add beta1 version generated Version 1.4.0 Apr 21, 2026

@mkllnk mkllnk left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's good to see that most changes are just additions to the code. So there's a lot of compatibility with older versions. But we can't parse a typical 1.16 document with our 2.0 context. For example, we currently use SuppliedProduct#isVariantOf which would fail to parse with v2 context. Similarly, if we publish data with the new Variant type then v1 platforms won't understand it. If they use a cached context then parsing will fail and they can't even use the compatible data. I think that we need to use explicit version numbers for the context. And we can't use this version of the code to parse v1 documents.

I'm not sure if you would like to build in multi-version support. Otherwise my best idea is to fork v1 of this repo and publish ofn-dfc-connector-v1 gem with a separate namespace so that both libraries can be loaded in the same app. Then, depending on the incoming request to our API, we can use either library to process the data. What do you think?

Comment thread lib/datafoodconsortium/connector/context.rb
Comment thread lib/datafoodconsortium/connector/context.rb
Comment thread lib/datafoodconsortium/connector/context_1.14.0.json
@lecoqlibre

Copy link
Copy Markdown
Member Author

I'm not sure if you would like to build in multi-version support. Otherwise my best idea is to fork v1 of this repo and publish ofn-dfc-connector-v1 gem with a separate namespace so that both libraries can be loaded in the same app. Then, depending on the incoming request to our API, we can use either library to process the data. What do you think?

Yes I think you're right, if you still want to use the v1 we should publish two separate packages because it will be too complicated to support multi-version.

And I should rename this version to 2.0.0 since there are breaking changes.

@lecoqlibre lecoqlibre closed this Apr 24, 2026
@lecoqlibre lecoqlibre deleted the v1.4.0 branch April 24, 2026 10:20
@lecoqlibre lecoqlibre changed the title Version 1.4.0 Version 1.4.0 (renamed to v2.0.0) Apr 24, 2026
@lecoqlibre lecoqlibre mentioned this pull request Apr 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants