From matusvalo at gmail.com Mon Mar 3 14:47:23 2025 From: matusvalo at gmail.com (matus valo) Date: Mon, 3 Mar 2025 20:47:23 +0100 Subject: [Cython] Shared utility Option vs. Compilation Directive Message-ID: Hi All, Based on the comment https://github.com/cython/cython/pull/6531#discussion_r1975502026 I would like to start a discussion about using Option vs Compilation Directive. Basically, we have 3 options: 1. Use PR https://github.com/cython/cython/pull/6531 as is. I will proceed with the rest of the comments. 2. Use `Option` directly with no further changes in the Cython codebase. This is the initial implementation. I created a branch with a version of the PR with rollback of all changes related to the Compilation Directive adjustments: https://github.com/cython/cython/compare/master...matusvalo:shared_library_option?expand=1 3. Use code changes/cleanup in https://github.com/cython/cython/pull/6646 but Shared Utility will be configured using `Option` instead of Compilation directive (Option 2.). I am not sure it this point makes sense, only in case that we want to keep changes by @da-woods improves the code internals. I would like to have an agreement on this topic before moving forward with other comments in the PR. Thanks, Matus -------------- next part -------------- An HTML attachment was scrubbed... URL: From matusvalo at gmail.com Mon Mar 3 15:29:11 2025 From: matusvalo at gmail.com (matus valo) Date: Mon, 3 Mar 2025 21:29:11 +0100 Subject: [Cython] Shared utility Option vs. Compilation Directive In-Reply-To: <4b2a7b64-4faf-4998-90bb-d00855ca1a5b@d-woods.co.uk> References: <4b2a7b64-4faf-4998-90bb-d00855ca1a5b@d-woods.co.uk> Message-ID: > I don't think 3 is worthwhile. I tend to agree. > I weakly prefer 1 to 2 on the basis that we were trying to get away from Options where possible. I think I have the same opinion. `Option` variant is much simpler and I cannot see any benefit using a shared module with only a subset of .pyx files. Matus On Mon, 3 Mar 2025 at 21:07, da-woods wrote: > Personally: > > I don't think 3 is worthwhile. > > I weakly prefer 1 to 2 on the basis that we were trying to get away from > Options where possible. However, this is probably a case where Options > will usually be right (it forces a setting on every module that you're > processing in a batch, which is what most people will want here. But maybe > not everyone). > > David > > > On 03/03/2025 19:47, matus valo wrote: > > Hi All, > > Based on the comment > https://github.com/cython/cython/pull/6531#discussion_r1975502026 I would > like to start a discussion about using Option vs Compilation Directive. > Basically, we have 3 options: > > 1. Use PR https://github.com/cython/cython/pull/6531 as is. I will > proceed with the rest of the comments. > 2. Use `Option` directly with no further changes in the Cython codebase. > This is the initial implementation. I created a branch with a version of > the PR with rollback of all changes related to the Compilation Directive > adjustments: > https://github.com/cython/cython/compare/master...matusvalo:shared_library_option?expand=1 > 3. Use code changes/cleanup in https://github.com/cython/cython/pull/6646 > but Shared Utility will be configured using `Option` instead of Compilation > directive (Option 2.). I am not sure it this point makes sense, only in > case that we want to keep changes by @da-woods improves > the code internals. > > I would like to have an agreement on this topic before moving forward with > other comments in the PR. > > > Thanks, > > Matus > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dw-git at d-woods.co.uk Mon Mar 3 15:07:39 2025 From: dw-git at d-woods.co.uk (da-woods) Date: Mon, 3 Mar 2025 20:07:39 +0000 Subject: [Cython] Shared utility Option vs. Compilation Directive In-Reply-To: References: Message-ID: <4b2a7b64-4faf-4998-90bb-d00855ca1a5b@d-woods.co.uk> Personally: I don't think 3 is worthwhile. I weakly prefer 1 to 2 on the basis that we were trying to get away from Options where possible.? However, this is probably a case where Options will usually be right (it forces a setting on every module that you're processing in a batch, which is what most people will want here. But maybe not everyone). David On 03/03/2025 19:47, matus valo wrote: > Hi All, > > Based on the comment > https://github.com/cython/cython/pull/6531#discussion_r1975502026 I > would like to start a discussion about using Option vs Compilation > Directive. Basically, we have 3 options: > > 1. Use PR https://github.com/cython/cython/pull/6531 as is. I will > proceed with the rest of the comments. > 2. Use `Option` directly with no further changes in the Cython > codebase. This is the initial implementation. I created a branch with > a version of the? PR with rollback of all changes related to the > Compilation?Directive adjustments: > https://github.com/cython/cython/compare/master...matusvalo:shared_library_option?expand=1 > 3. Use code changes/cleanup in > https://github.com/cython/cython/pull/6646 but Shared Utility will be > configured using `Option` instead of Compilation directive (Option > 2.). I am not sure it this point makes sense, only in case that we > want to keep changes by @da-woods > ?improves the code internals. > > I would like to have an agreement on this topic before moving forward > with other comments in?the PR. > > > Thanks, > > Matus -------------- next part -------------- An HTML attachment was scrubbed... URL: