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

Bugfix/2025 01 table query macro error #354

Merged
merged 2 commits into from
Jan 5, 2025

Conversation

takapi327
Copy link
Owner

@takapi327 takapi327 commented Jan 4, 2025

Implementation Details

TableQuery construction using macros in a location not under the ldbc package object causes a compile error.

[error] 10 |  protected final val city: TableQuery[CityTable] = TableQuery[CityTable]
[error]    |                                                        ^^^^^^^^^^^^^^^^^^^^^^^
[error]    |                                        Found:    ldbc.schema.Table.type
[error]    |                                        Required: ?{ Opt: ? }
[error]    |----------------------------------------------------------------------------
[error]    |Inline stack trace
[error]    |- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
[error]    |This location contains code that was inlined from TableQuery.scala:53
[error]     ----------------------------------------------------------------------------
[error]    |
[error]    | longer explanation available when compiling with `-explain`
[error] one error found
[error] (Compile / compileIncremental) Compilation failed

This problem occurred because the actual state of TableQuery constructed by the macro was private[ldbc] and its use was permitted only under the package of ldbc.

Eliminating the PRIVATE limitation eliminated this problem.

Pull Request Checklist

  • Wrote unit and integration tests
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code formatting by scalafmt (sbt scalafmtAll command execution)
  • Add copyright headers to new files

References

@takapi327 takapi327 added 🪲 bug Something isn't working project:queryBuilder Addition and modification of functionality to Query Builder projects project:schema Addition and modification of functionality to Schema projects labels Jan 4, 2025
@takapi327 takapi327 added this to the 0.3.0 milestone Jan 4, 2025
@takapi327 takapi327 self-assigned this Jan 4, 2025
@takapi327 takapi327 merged commit ce53e20 into master Jan 5, 2025
27 checks passed
@takapi327 takapi327 deleted the bugfix/2025-01-TableQuery-macro-error branch January 5, 2025 08:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🪲 bug Something isn't working project:queryBuilder Addition and modification of functionality to Query Builder projects project:schema Addition and modification of functionality to Schema projects
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant