Re: Pre-processing during build - Mailing list pgsql-jdbc

From Markus KARG
Subject Re: Pre-processing during build
Date
Msg-id 009201d0a941$f15ebab0$d41c3010$@eu
Whole thread Raw
In response to Re: Pre-processing during build  (Stephen Nelson <stephen@eccostudio.com>)
List pgsql-jdbc

Stephen,

 

don't fear the complexity, it will soon be shown that it is pretty simple once everybody understood that https://gist.github.com/mkarg/88a89ae0dbffcfb7543e solves most of the fear and that proxies will select the right JDBC level. In the end, the solution will be dead simple and rock solid, I hope. Let's just finish the discussion.

 

I do not see that an annotation processor will improve anything here, and the code change actually is not massive at all, but a necessity to come to a feasible design.

 

-Markus

 

From: pgsql-jdbc-owner@postgresql.org [mailto:pgsql-jdbc-owner@postgresql.org] On Behalf Of Stephen Nelson
Sent: Mittwoch, 17. Juni 2015 22:43
To: PostgreSQL JDBC
Subject: Re: [JDBC] Pre-processing during build

 

The discussion has veered off topic somewhat with the discussion of build systems and their respective qualities.

My pull request is proposing to change build system from Ant to Maven. All existing functionality in the Ant build has been/will be replicated in the Maven build - including the pre-processing step. There are many advantages to using Maven as opposed to Ant. However, this is orthogonal to the discussion I'd like to have about the pre-processing used during the build process.

Focusing on the aim of the current pre-processing step - which is to select the appropriate spec implementation at compile time. The options seem quite complicated to me as a relative novice in the finer points of the language spec.

Taking a step back, could this not be achieved using annotations and a custom annotation processor to emit some code to select the correct implementation of the spec? This seems more Java-like and not a massive change from the existing code.

pgsql-jdbc by date:

Previous
From: "Markus KARG"
Date:
Subject: Re: Pre-processing during build
Next
From: Vladimir Sitnikov
Date:
Subject: Re: Pre-processing during build