metanorma / pubid-core

BSD 2-Clause "Simplified" License
1 stars 0 forks source link

Incorrect rendering of part and subpart number order #18

Closed andrew2net closed 1 year ago

andrew2net commented 1 year ago

After update this gem to v 1.8.6 we have:

> id = Pubid::Iso::Identifier.parse("ISO/IEC TR 29110-5-1-3:2017") # the part number is "5-1-3"
#<Pubid::Iso::Identifier::TechnicalReport:0x0000000105ad1190 @publisher="ISO", @number="29110"@11, @copublisher="IEC", @year=2017, @part=["5"@17, "1"@19, "3"@21]>

> id.to_s
"ISO/IEC TR 29110-3-1-5:2017" # the part number bcomes "3-1-5"
ronaldtse commented 1 year ago

@mico can you please help fix this ASAP? Thanks.

mico commented 1 year ago

@mico can you please help fix this ASAP? Thanks.

@ronaldtse @andrew2net this is already fixed in https://github.com/metanorma/pubid-iso/commit/836ec1b3b1600a1934e9f8c8f0907123327d9055

But the error above could appear when using pubid-core 1.8.6 with previous pubid-iso versions.

andrew2net commented 1 year ago

But the error above could appear when using pubid-core 1.8.6 with previous pubid-iso versions.

@mico In such cases we should increase the minor version to prevent using incompatible dependencies.

mico commented 1 year ago

But the error above could appear when using pubid-core 1.8.6 with previous pubid-iso versions.

@mico In such cases we should increase the minor version to prevent using incompatible dependencies.

I know that. I didn't know that it will affect other gems.

mico commented 1 year ago

Currently affected gem's:

andrew2net commented 1 year ago

I know that. I didn't know that it will affect other gems.

@mico please make a test for this case

mico commented 1 year ago

I know that. I didn't know that it will affect other gems.

@mico please make a test for this case

@ronaldtse @andrew2net I believe we need to run tests on all pubid-* for every pubid-core pull request. So we will see if there are any breaking changes.

ronaldtse commented 1 year ago

@mico I agree. @CAMOBAP could you help consider how we can achieve this? Basically pubid-core is the core gem that all pubid-* gems have to require.

CAMOBAP commented 1 year ago

@mico @ronaldtse https://github.com/metanorma/pubid-core/actions/workflows/dependent-tests.yml implemented

ronaldtse commented 1 year ago

@CAMOBAP this is perfect, thank you very much!

This flow captures the problems succinctly: https://github.com/metanorma/pubid-core/actions/runs/5790375089/job/15693339030#step:6:251

Screenshot 2023-08-09 at 8 15 00 AM
ronaldtse commented 1 year ago

@mico the BSI and JIS pubid gems are failing due to this change, can you please help fix them? Thanks.