Bug 92398 - [compiler] Leverage access rule support in batch compiler
Summary: [compiler] Leverage access rule support in batch compiler
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.1 RC1   Edit
Assignee: Maxime Daniel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-22 11:35 EDT by Philipe Mulet CLA
Modified: 2005-05-27 10:02 EDT (History)
1 user (show)

See Also:


Attachments
Batch compiler test class extension to take command lines into account (12.71 KB, patch)
2005-05-06 12:35 EDT, Maxime Daniel CLA
no flags Details | Diff
Add function as '[+-~pattern]' extension to classpath values (29.03 KB, patch)
2005-05-11 01:54 EDT, Maxime Daniel CLA
no flags Details | Diff
Batch compiler test class improvements + access rules tests (27.34 KB, patch)
2005-05-11 01:56 EDT, Maxime Daniel CLA
no flags Details | Diff
function as '[+-~pattern]' extension to classpath values (30.92 KB, patch)
2005-05-19 06:44 EDT, Maxime Daniel CLA
no flags Details | Diff
Batch compiler tests improvements + access rules tests (46.33 KB, patch)
2005-05-19 06:47 EDT, Maxime Daniel CLA
no flags Details | Diff
Tests -- HEAD catchup (tolerate timestamps in logs, etc.) (49.53 KB, patch)
2005-05-25 10:10 EDT, Maxime Daniel CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Philipe Mulet CLA 2005-04-22 11:35:40 EDT
3.1m6

The batch compiler should allow to be specified access rules on a per classpath
entry basis
Comment 1 Maxime Daniel CLA 2005-05-06 12:35:20 EDT
Created attachment 20782 [details]
Batch compiler test class extension to take command lines into account

The rationale is to enable a command line invocation that does not talk to the
underlying APIs. The suggested patch specializes runConformTest and
runNegativeTest, then leverages these from a couple of concrete tests.
Comment 2 Maxime Daniel CLA 2005-05-11 01:54:24 EDT
Created attachment 20929 [details]
Add function as '[+-~pattern]' extension to classpath values

Adds the function as follows:
- each classpath (or bootclasspath) entry can be followed by a '[' ']' enclosed

  list of access rules;
- each access rule is composed of a one-character permission specification and
  a rule pattern; the permission specification is '+' for accessible, '~' for
  discourage, and '-' for forbidden; patterns are the same as in the UI;
- rules must be separated by the file separator (aka ';' on Windows).

Further work for consideration:
- consolidate classpaths lists;
- factorize common behavior between ClasspathDirectory and ClasspathJar;
- revisit command line analyzer.
Comment 3 Maxime Daniel CLA 2005-05-11 01:56:43 EDT
Created attachment 20930 [details]
Batch compiler test class improvements + access rules tests

Improves the test class in the following respects:
- more complete output in case of mismatch;
- normalize the OUTPUT_DIR value in comparison.
Adds test cases for 20929.
Comment 4 Maxime Daniel CLA 2005-05-16 11:11:46 EDT
See also https://bugs.eclipse.org/bugs/show_bug.cgi?id=95349, that should impact
test cases.
Comment 5 Maxime Daniel CLA 2005-05-19 06:44:27 EDT
Created attachment 21413 [details]
function as '[+-~pattern]' extension to classpath values

Refactoring as suggested in comments to attachment 20929 [details].
Comment 6 Maxime Daniel CLA 2005-05-19 06:47:53 EDT
Created attachment 21414 [details]
Batch compiler tests improvements + access rules tests

Improves 20930 by adding some tests and being more resilient to changes in test
machine configuration.
Also integrates log file tests (used by
https://bugs.eclipse.org/bugs/show_bug.cgi?id=95349).
Comment 7 Maxime Daniel CLA 2005-05-19 06:51:16 EDT
(In reply to comment #6)
> Also integrates log file tests (used by
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=95349).
Pls read instead https://bugs.eclipse.org/bugs/show_bug.cgi?id=93904 (apologies).

Comment 8 Olivier Thomann CLA 2005-05-24 12:05:14 EDT
Maxime, Could you please provide a patch based on HEAD?

I cannot apply your patch (provided in comment 5) directly on top of HEAD.
Comment 9 Maxime Daniel CLA 2005-05-25 10:10:59 EDT
Created attachment 21716 [details]
Tests -- HEAD catchup (tolerate timestamps in logs, etc.)
Comment 10 Olivier Thomann CLA 2005-05-25 10:14:59 EDT
Fixed and release in HEAD.
Regression tests added in
org.eclipse.jdt.core.tests.compiler.regression.BatchCompilerTest.

Changes in:
org.eclipse.jdt.internal.compiler.batch.messages.properties
org.eclipse.jdt.internal.compiler.batch.ClasspathDirectory
org.eclipse.jdt.internal.compiler.batch.ClasspathJar
org.eclipse.jdt.internal.compiler.batch.ClasspathLocation
org.eclipse.jdt.internal.compiler.batch.FileSystem
org.eclipse.jdt.internal.compiler.batch.Main

org.eclipse.jdt.internal.compiler.env.AccessRuleSet
Comment 11 Frederic Fusier CLA 2005-05-27 10:02:42 EDT
Verified for 3.1 RC1 with build I20050527-0010.