Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[tycho-dev] target platform filtering configuration syntax

In order to allow more control over project build target platform
contents, we plan to introduce ability to filter available installable
units [1].

We are currently considering two alternative ways to configure
filtering. Both provide equivalent functionality and we would appreciate
some feedback to help us choose the pretties (or the least ugly,
depending on your view of half-full/half-empty debate :-) ).

<restrictTo> syntax. This syntax is optimized to handle multiple version
of the same installable unit as in shown the short example below, but
the full syntax allows any include/exclude as demonstrated in [2]. The
possibility of conflicting filter definitions is the downside of this
syntax. I also find the full syntax harder to understand, although this
is subjective.

  <filter>
    <type>eclipse-plugin</type>
    <id>org.eclipse.jdt.core</id>
    <restrictTo>
      <version>3.7.1.v_B76_R37x</version>
    </restrictTo>
  </filter>


exclude/keep syntax. This syntax takes more traditional approach to
filter configuration, but results in slightly more verbose configuration
required to handle multiple versions of the same installable unit.
<keep> element does not directly explain why certain IUs are required
(unless the user added <!-- comment -->), which is another possible
downside.

  <excludes>
    <exclude>
      <ns>osgi.bundle</ns>
      <id>org.eclipse.jdt.core</id>
    </exclude>
  </excludes>
  <keeps>
    <keep>
      <id>org.eclipse.jdt.core</id>
      <versionRange>3.7.1.v_B76_R37x</versionRange>
    </keep>
  </keeps>


What do you think?

[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=356579
[2] http://git.eclipse.org/c/tycho/org.eclipse.tycho.git/tree/tycho-core/src/test/resources/targetfilter?id=201655ddf41b17015bec0f6ec3cb425cdd59a472

--
Regards,
Igor


Back to the top