Skip to content

Conversation

@JekiXD
Copy link
Collaborator

@JekiXD JekiXD commented Sep 1, 2025

This PR create 3 different modules for 3 different types of lines. All lines are separated by features.

The reason is to improve performance for application that do not need uv mapping or transparency support for the line. This PR allows the user to choose which type of line to choose bases on the needs.

Solid line - the most performant but does not support transparency.
Transparent line - requires more expensive shader logic, but can be transparent
Uv line - add more expensive geometry on top of transparent line. The most expensive line

@JekiXD JekiXD changed the title NOT READY : Line tools - features lines NEED REVIEW : Line tools - features lines Sep 2, 2025
Copy link
Collaborator

@vadimb892 vadimb892 left a comment

Choose a reason for hiding this comment

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

Add PR description

Copy link
Collaborator

@wanguardd wanguardd left a comment

Choose a reason for hiding this comment

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

Hey @JekiXD, just finished my review of 'NEED REVIEW : Line tools - features lines'. Solid work! I've got a few thoughts on how we can polish this up for the merge.

🧭 Strategic Suggestion

This PR has already received "changes requested" review requesting a PR description. The PR lacks proper documentation explaining the scope and purpose of this major refactoring.

Reasoning: This is a high-level suggestion to ensure we stay aligned with the project's long-term goals.


🧭 Strategic Suggestion

This PR introduces a major architectural change to line_tools, restructuring it into specialized line types (solid, transparent, uv) with feature gates. While the internal module structure compiles correctly, the breaking API changes haven't been properly handled for existing consumers.

Reasoning: This is a high-level suggestion to ensure we stay aligned with the project's long-term goals.


This is a great contribution. Let me know if anything's unclear or if you want to jump on a quick call to discuss. Excited to see the next version!

@wanguardd wanguardd changed the title NEED REVIEW : Line tools - features lines NOT READY : Line tools - features lines Sep 2, 2025
@JekiXD JekiXD changed the title NOT READY : Line tools - features lines NEED REVIEW : Line tools - features lines Sep 4, 2025
Copy link
Collaborator

@wanguardd wanguardd left a comment

Choose a reason for hiding this comment

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

Hey @JekiXD, just finished my review of 'NEED REVIEW : Line tools - features lines'. I've encountered critical compilation issues that need to be addressed before this can be merged.

🛑 Blocker

This PR introduces breaking API changes in line_tools that prevent examples from compiling. The Line, Cap, and Join types are no longer available in their original locations (line_tools::d2::Line, line_tools::Cap, line_tools::Join) and have been moved to sub-modules like line_tools::d2::solid::, line_tools::d2::transparent::, and line_tools::d2::uv::*.

Reasoning: This is a critical issue that must be resolved as it prevents the build from completing or violates a core project requirement.


🛑 Blocker

Examples in examples/minwebgl/2d_line cannot compile due to the API restructuring. The compiler shows 10 compilation errors where the code expects to find Line, Cap, and Join at their previous locations.

Reasoning: This is a critical issue that must be resolved as it prevents the build from completing or violates a core project requirement.


🧭 Strategic Suggestion

Consider providing backward compatibility or updating all dependent examples and documentation as part of this PR to ensure the codebase remains functional after the architectural changes.

Reasoning: This is a high-level suggestion to ensure we stay aligned with the project's long-term goals.


This looks like a significant architectural improvement, but the breaking changes need to be handled properly. Please either:

  1. Update all dependent examples to use the new API structure, or
  2. Provide backward compatibility to maintain existing functionality, or
  3. Include migration documentation for the API changes

Let me know if you'd like to discuss the approach - this is solid foundational work that just needs the integration pieces sorted out!

@wanguardd wanguardd changed the title NEED REVIEW : Line tools - features lines NOT READY : Line tools - features lines Sep 4, 2025
@JekiXD JekiXD changed the title NOT READY : Line tools - features lines NEED REVIEW : Line tools - features lines Sep 4, 2025
Copy link
Collaborator

@wanguardd wanguardd left a comment

Choose a reason for hiding this comment

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

Hey @JekiXD, just finished my review of 'NEED REVIEW : Line tools - features lines'. Unfortunately, there's a critical build issue that prevents this PR from merging.

🛑 Blocker

Build compilation failure prevents code review. The PR contains breaking API changes in the line_tools module that have not been propagated to dependent examples.

Reasoning: This is a critical issue that must be resolved as it prevents the build from completing or violates a core project requirement.


Suggestion

EVIDENCE: cargo build --all-features failed with error[E0412]: cannot find type Line in module line_tools::d2 across 14 locations in examples/minwebgl/2d_line/src/


Please fix the compilation issues and update the PR when ready for re-review.

@wanguardd wanguardd changed the title NEED REVIEW : Line tools - features lines NOT READY : Line tools - features lines Sep 4, 2025
@JekiXD JekiXD changed the title NOT READY : Line tools - features lines NEED REVIEW : Line tools - features lines Sep 5, 2025
Copy link
Collaborator

@wanguardd wanguardd left a comment

Choose a reason for hiding this comment

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

Hey @JekiXD, just finished my review of 'NEED REVIEW : Line tools - features lines'. This architectural refactoring has solid performance goals, but there are critical issues blocking merge.

🛑 Blocker

PR contains unresolved breaking API changes that prevent examples from compiling. The Line, Cap, and Join types have been moved from line_tools::d2 to specialized modules (solid/transparent/uv), but dependent examples haven't been updated accordingly.

Reasoning: This is a critical issue that must be resolved as it prevents the build from completing or violates a core project requirement.


🛑 Blocker

Previous review feedback requesting compilation fixes has not been addressed. There are 5 existing CHANGES_REQUESTED reviews highlighting the same build issues, indicating this PR needs substantial work before it's ready for merge.

Reasoning: This is a critical issue that must be resolved as it prevents the build from completing or violates a core project requirement.


🧭 Strategic Suggestion

The architectural concept is sound - separating line rendering into performance-optimized variants (solid/transparent/uv) aligns well with WebAssembly efficiency goals. However, this large-scale refactoring needs proper migration support and updated examples.

Reasoning: This is a high-level suggestion to ensure we stay aligned with the project's long-term goals.


🧭 Strategic Suggestion

Consider providing either: 1) A compatibility layer to ease migration, 2) Complete updates to all dependent examples, or 3) Comprehensive migration documentation. The current approach leaves the codebase in a broken state.

Reasoning: This is a high-level suggestion to ensure we stay aligned with the project's long-term goals.


This is solid foundational work that addresses a real performance need. Once the compilation issues are resolved and examples are updated, this will be a valuable addition. Please fix the build errors and I'll be happy to re-review!

@wanguardd wanguardd changed the title NEED REVIEW : Line tools - features lines NEED REVIEW : Line tools - features lines (blocking issues) Sep 5, 2025
@JekiXD
Copy link
Collaborator Author

JekiXD commented Sep 5, 2025

Hey @JekiXD, just finished my review of 'NEED REVIEW : Line tools - features lines'. This architectural refactoring has solid performance goals, but there are critical issues blocking merge.

🛑 Blocker

PR contains unresolved breaking API changes that prevent examples from compiling. The Line, Cap, and Join types have been moved from line_tools::d2 to specialized modules (solid/transparent/uv), but dependent examples haven't been updated accordingly.

Reasoning: This is a critical issue that must be resolved as it prevents the build from completing or violates a core project requirement.

🛑 Blocker

Previous review feedback requesting compilation fixes has not been addressed. There are 5 existing CHANGES_REQUESTED reviews highlighting the same build issues, indicating this PR needs substantial work before it's ready for merge.

Reasoning: This is a critical issue that must be resolved as it prevents the build from completing or violates a core project requirement.

🧭 Strategic Suggestion

The architectural concept is sound - separating line rendering into performance-optimized variants (solid/transparent/uv) aligns well with WebAssembly efficiency goals. However, this large-scale refactoring needs proper migration support and updated examples.

Reasoning: This is a high-level suggestion to ensure we stay aligned with the project's long-term goals.

🧭 Strategic Suggestion

Consider providing either: 1) A compatibility layer to ease migration, 2) Complete updates to all dependent examples, or 3) Comprehensive migration documentation. The current approach leaves the codebase in a broken state.

Reasoning: This is a high-level suggestion to ensure we stay aligned with the project's long-term goals.

This is solid foundational work that addresses a real performance need. Once the compilation issues are resolved and examples are updated, this will be a valuable addition. Please fix the build errors and I'll be happy to re-review!

What command did you use to compile the examples? Examples use features and compile code based on the turned on features. The features are specified in the Cargo.toml, so a command like trunk serve compiles everything just fine

Copy link
Collaborator

@wanguardd wanguardd left a comment

Choose a reason for hiding this comment

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

NOT READY - Build Failures Due to Breaking API Changes

This PR introduces breaking changes to the line_tools API that cause compilation failures in dependent examples. The build must be fixed before this PR can be approved.

Critical Issues Found

Build Status: FAILED - 14 compilation errors detected in minwebgl_2d_line example

Specific Problems

  1. API Restructuring Without Updates: The PR moves types from line_tools::d2 to namespaced modules:

    • line_tools::d2::Lineline_tools::d2::solid::Line (and transparent/uv variants)
    • line_tools::Capline_tools::d2::solid::Cap (and transparent/uv variants)
    • line_tools::Joinline_tools::d2::solid::Join (and transparent/uv variants)
  2. Broken Example Code: The following files need updates:

    • examples/minwebgl/2d_line/src/events.rs:8 - Line type reference
    • examples/minwebgl/2d_line/src/main.rs - Multiple Line, Cap, and Join references (lines 66, 67, 69, 71, 114, 116, 121, 123, 128, 130, 152, 153, 154)

Required Fixes

Author must update all dependent code to use new API paths:

// Update imports in affected files:
use line_tools::d2::solid::Line;  // or transparent/uv as appropriate
use line_tools::d2::solid::Cap;   // or transparent/uv as appropriate  
use line_tools::d2::solid::Join;  // or transparent/uv as appropriate

// Update usage patterns throughout examples

Evidence

Build command: cargo nextest run --all-features
Result: 14 compilation errors in minwebgl_2d_line
Full error log available in automated build checks


Review Status: NOT READY - Requires author fixes before re-review
Next Steps: Fix compilation errors, then request re-review

@wanguardd wanguardd changed the title NEED REVIEW : Line tools - features lines (blocking issues) NOT READY: NEED REVIEW : Line tools - features lines (blocking issues) Sep 8, 2025
@wanguardd wanguardd changed the title NOT READY: NEED REVIEW : Line tools - features lines (blocking issues) NOT READY: Line tools - features lines (blocking issues) Sep 9, 2025
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.

3 participants