Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Made parser capable of handling USEMINSPACING and MASKS in rectangles #45

Merged
merged 1 commit into from
Jun 18, 2024

Conversation

DavidAguilo
Copy link
Contributor

Needed to handle these 2 keywords for a project, thought I might as well contribute.

@dan-fritchman
Copy link
Owner

Awesome thanks!

@dan-fritchman dan-fritchman merged commit efc5aa4 into dan-fritchman:main Jun 18, 2024
1 of 5 checks passed
@dan-fritchman
Copy link
Owner

Sorry but this was failing to build and/or test, and had to be reverted via #46.

   Compiling layout21raw v3.0.0-pre.3 (/Users/dan/dev/Vlsir/Layout21/layout21raw)
error[E0308]: `?` operator has incompatible types
   --> layout21raw/src/lef.rs:136:39
    |
136 | ...21::LefShape::Rect(self.export_point(&r.p0)?, self.export_point(&r.p1)?)
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Option<Decimal>`, found `LefPoint`
    |
    = note: `?` operator cannot convert from `LefPoint` to `std::option::Option<rust_decimal::decimal::Decimal>`
    = note: expected enum `std::option::Option<rust_decimal::decimal::Decimal>`
             found struct `LefPoint`

error[E0061]: this enum variant takes 3 arguments but 2 arguments were supplied
   --> layout21raw/src/lef.rs:136:17
    |
136 | ...   lef21::LefShape::Rect(self.export_point(&r.p0)?, self.export_point(&r.p1)?)
    |       ^^^^^^^^^^^^^^^^^^^^^------------------------------------------------------ an argument of type `LefPoint` is missing
    |
note: tuple variant defined here
   --> /Users/dan/dev/Vlsir/Layout21/lef21/src/data.rs:429:5
    |
429 |     Rect(Option<LefDecimal>, LefPoint, LefPoint),
    |     ^^^^
help: provide the argument
    |
136 |                 lef21::LefShape::Rect(self.export_point(&r.p0)?, self.export_point(&r.p1)?, /* LefPoint */)
    |                                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

error[E0023]: this pattern has 2 fields, but the corresponding tuple variant has 3 fields
   --> layout21raw/src/lef.rs:382:18
    |
382 |             Rect(ref p0, ref p1) => self.import_rect((p0, p1)),
    |                  ^^^^^^  ^^^^^^ expected 3 fields, found 2
    |
   ::: /Users/dan/dev/Vlsir/Layout21/lef21/src/data.rs:429:10
    |
429 |     Rect(Option<LefDecimal>, LefPoint, LefPoint),
    |          ------------------  --------  -------- tuple variant has 3 fields
    |
help: use `_` to explicitly ignore each field
    |
382 |             Rect(ref p0, ref p1, _) => self.import_rect((p0, p1)),
    |                                +++

@DavidAguilo do you want to make some updates and we can roll it back in?

@DavidAguilo
Copy link
Contributor Author

DavidAguilo commented Jun 26, 2024

Ok, I'll take a look at it. I guess changing the Rect struct made it necessary to change the tests as well. Oh and layout21.

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