Comments (11)
@KuceraMartin said he wanted to look into this, but if anyone else wants to try their hand at this feel free to do so
from scalasql.
hi @mrdziuban sorry for the late reply, I am just a macro beginner. So it was beyond me. glad you completed it.
from scalasql.
Hi this sounds like an interesting exercise. I am new to macros but consider this as an opportunity to learn them. So would like to work on it if its ok. Thank you.
Please go ahead! No need to ask me for permission
from scalasql.
Sounds like a fun thing to do
from scalasql.
I tried doing this and discovered scala/scala3#19480
from scalasql.
I discovered scala/scala3#19436 in #3. I also tried a different approach with mirrors and ran into another compiler crash scala/scala3#19493.
It seems there are many different ways to approach this. @ghik would you be interested in discussing our thoughts? Maybe together we could find another approach that doesn't break the compiler :D
from scalasql.
Sure, but I haven't even gotten to porting the macro itself. I just tried to compile tests on Scala 3...
from scalasql.
Actually I never tried compiling all the tests. Now that I did, I see I'm getting the same compiler crash as you.
I started by removing most tests and trying to write a macro that would generate something similar to what the Scala 2 TableMacros
does, as per @lihaoyi's advice. You could try the same thing if you want. If you do so, you can cherry-pick this commit a96df75 which fixes some trivial Scala 3 incompatibilities outside of macros. Then, delete all tests except for e.g. Main.scala
. Then, if you just replace TableMacros
with
trait TableMacros:
given metadata[V[_[_]]]: Table.Metadata[V] = ???
it will at least compile. Later on, you can start adding some tests back. I tried multiple and never ran into that compiler crash. For instance SqliteExample.scala
should work.
If you're interested in discussing it further, let's connect on Discord (mine is martin.kucera)
from scalasql.
@KuceraMartin FYI scala/scala3#19480 already has a working fix on the way, I compiled the tests successfully with it
I'm going to take a break from this for now, but I'll be happy to discuss details if I come back to it.
from scalasql.
Hi this sounds like an interesting exercise. I am new to macros but consider this as an opportunity to learn them. So would like to work on it if its ok. If this will be too much of an effort for a macro newbie I am happy for someone else to work on this.Thank you.
from scalasql.
Hey @vvidlearn, are you still looking into this? I'm curious to look as well but don't want to step on your toes
from scalasql.
Related Issues (8)
- flatMap is unsafe HOT 1
- Huge memory increase in `renderSql` with scala 2.13.13 (OOM) HOT 3
- Invalid published scalasql-core POM file (Error resolving scalasql_2.13 0.1.0) HOT 2
- Using the H2Dialect, how does one retrieve auto-generated keys? HOT 2
- Nested/Embedded datastructures possible? HOT 1
- How to select database schema? HOT 2
- Scala reflect error HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scalasql.