[
https://issues.apache.org/jira/browse/GEODE-8285?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Bill Burcham updated GEODE-8285:
--------------------------------
Description:
Serializable analysis classes derived from
{{AnalyzeSerializablesJUnitTestBase}}, intend to inform the developer to copy a
generated {{excludedClasses.txt}} file over a
{{sanctionedDataSerializables.txt}} in a _resources_ directory. The paths can
get long and complicated so it's nice that the analyzers provide the paths,
ostensibly so that a developer can simply copy them into a {{cp}} line at the
terminal.
There is a problem with one of the paths, at least as generated by
{{AnalyzeCoreSerializablesJUnitTest}}, but also, I suspect in all the classes
derived from {{AnalyzeSerializablesJUnitTestBase}}. Here is an example of the
output generated by the former…
I ran:
{noformat}
± |feature/GEODE-8240-version-ordinal-type → Bill {3} ✓| → ./gradlew
:geode-core:integrationTest --tests=AnalyzeCoreSerializablesJUnitTest
{noformat}
and it output:
{noformat}
If the class is not persisted or sent over the wire add it to the file
/Users/bburcham/Projects/geode/geode-core/build/resources/integrationTest/org/apache/geode/codeAnalysis/excludedClasses.txt
Otherwise if this doesn't break backward compatibility, copy the file
/Users/bburcham/Projects/geode/geode-core/build/integrationTest/actualDataSerializables.dat
to
/Users/bburcham/Projects/geode/geode-core/build/resources/integrationTest/org/apache/geode/codeAnalysis/sanctionedDataSerializables.txt.
{noformat}
so ostensibly I should:
{code}
cp
/Users/bburcham/Projects/geode/geode-core/build/integrationTest/actualDataSerializables.dat
/Users/bburcham/Projects/geode/geode-core/build/resources/integrationTest/org/apache/geode/codeAnalysis/sanctionedDataSerializables.txt
{code}
But in fact the destination is wrong! Notice that it is a {{.../build/...}}
directory?!?
What I really needed was:
{code}
cp
/Users/bburcham/Projects/geode/geode-core/build/integrationTest/actualDataSerializables.dat
/Users/bburcham/Projects/geode/geode-core/src/integrationTest/resources/org/apache/geode/codeAnalysis/sanctionedDataSerializables.txt
{code}
The prefix on the second path was:
{code}
/Users/bburcham/Projects/geode/geode-core/build/resources
{code}
but needed to be:
{code}
/Users/bburcham/Projects/geode/geode-core/src/integrationTest/resources
{code}
h2. Reproduction
To reproduce this, modify some {{toData}} on some serializable class in the
{{geode-core}} module e.g. {{RegionVersionVector}}, by adding some innocuous
code like:
{code}
System.out.println("hi!");
{code}
And then run:
{code}
$ ./gradlew :geode-core:integrationTest
--tests=AnalyzeCoreSerializablesJUnitTest
{code}
You'll see the an advice block like the one I provided above and you'll see the
incorrect destination directory.
was:
Serializable analysis classes derived from
{{AnalyzeSerializablesJUnitTestBase}}, intend to inform the developer to copy a
generated {{excludedClasses.txt}} file over a
{{sanctionedDataSerializables.txt}} in a _resources_ directory. The paths can
get long and complicated so it's nice that the analyzers provide the paths,
ostensibly so that a developer can simply copy them into a {{cp}} line at the
terminal.
There is a problem with one of the paths, at least as generated by
{{AnalyzeCoreSerializablesJUnitTest}}, but also, I suspect in all the classes
derived from {{AnalyzeSerializablesJUnitTestBase}}. Here is an example of the
output generated by the former…
I ran:
{noformat}
± |feature/GEODE-8240-version-ordinal-type → Bill {3} ✓| → ./gradlew
:geode-core:integrationTest --tests=AnalyzeCoreSerializablesJUnitTest
{noformat}
and it output:
{code}
If the class is not persisted or sent over the wire add it to the file
/Users/bburcham/Projects/geode/geode-core/build/resources/integrationTest/org/apache/geode/codeAnalysis/excludedClasses.txt
Otherwise if this doesn't break backward compatibility, copy the file
/Users/bburcham/Projects/geode/geode-core/build/integrationTest/actualDataSerializables.dat
to
/Users/bburcham/Projects/geode/geode-core/build/resources/integrationTest/org/apache/geode/codeAnalysis/sanctionedDataSerializables.txt.
{code}
so ostensibly I should:
{code}
cp
/Users/bburcham/Projects/geode/geode-core/build/integrationTest/actualDataSerializables.dat
/Users/bburcham/Projects/geode/geode-core/build/resources/integrationTest/org/apache/geode/codeAnalysis/sanctionedDataSerializables.txt
{code}
But in fact the destination is wrong! Notice that it is a {{.../build/...}}
directory?!?
What I really needed was:
{code}
cp
/Users/bburcham/Projects/geode/geode-core/build/integrationTest/actualDataSerializables.dat
/Users/bburcham/Projects/geode/geode-core/src/integrationTest/resources/org/apache/geode/codeAnalysis/sanctionedDataSerializables.txt
{code}
The prefix on the second path was:
{code}
/Users/bburcham/Projects/geode/geode-core/build/resources
{code}
but needed to be:
{code}
/Users/bburcham/Projects/geode/geode-core/src/integrationTest/resources
{code}
h2. Reproduction
To reproduce this, modify some {{toData}} on some serializable class in the
{{geode-core}} module e.g. {{RegionVersionVector}}, by adding some innocuous
code like:
{code}
System.out.println("hi!");
{code}
And then run:
{code}
$ ./gradlew :geode-core:integrationTest
--tests=AnalyzeCoreSerializablesJUnitTest
{code}
You'll see the an advice block like the one I provided above and you'll see the
incorrect destination directory.
> Serializables Sanctioning Prescribes Wrong Destination Path
> -----------------------------------------------------------
>
> Key: GEODE-8285
> URL: https://issues.apache.org/jira/browse/GEODE-8285
> Project: Geode
> Issue Type: Bug
> Components: tools
> Reporter: Bill Burcham
> Priority: Major
> Labels: starter
>
> Serializable analysis classes derived from
> {{AnalyzeSerializablesJUnitTestBase}}, intend to inform the developer to copy
> a generated {{excludedClasses.txt}} file over a
> {{sanctionedDataSerializables.txt}} in a _resources_ directory. The paths can
> get long and complicated so it's nice that the analyzers provide the paths,
> ostensibly so that a developer can simply copy them into a {{cp}} line at the
> terminal.
> There is a problem with one of the paths, at least as generated by
> {{AnalyzeCoreSerializablesJUnitTest}}, but also, I suspect in all the classes
> derived from {{AnalyzeSerializablesJUnitTestBase}}. Here is an example of the
> output generated by the former…
> I ran:
> {noformat}
> ± |feature/GEODE-8240-version-ordinal-type → Bill {3} ✓| → ./gradlew
> :geode-core:integrationTest --tests=AnalyzeCoreSerializablesJUnitTest
> {noformat}
> and it output:
> {noformat}
> If the class is not persisted or sent over the wire add it to the file
> /Users/bburcham/Projects/geode/geode-core/build/resources/integrationTest/org/apache/geode/codeAnalysis/excludedClasses.txt
> Otherwise if this doesn't break backward compatibility, copy the file
> /Users/bburcham/Projects/geode/geode-core/build/integrationTest/actualDataSerializables.dat
> to
> /Users/bburcham/Projects/geode/geode-core/build/resources/integrationTest/org/apache/geode/codeAnalysis/sanctionedDataSerializables.txt.
> {noformat}
> so ostensibly I should:
> {code}
> cp
> /Users/bburcham/Projects/geode/geode-core/build/integrationTest/actualDataSerializables.dat
>
> /Users/bburcham/Projects/geode/geode-core/build/resources/integrationTest/org/apache/geode/codeAnalysis/sanctionedDataSerializables.txt
> {code}
> But in fact the destination is wrong! Notice that it is a {{.../build/...}}
> directory?!?
> What I really needed was:
> {code}
> cp
> /Users/bburcham/Projects/geode/geode-core/build/integrationTest/actualDataSerializables.dat
>
> /Users/bburcham/Projects/geode/geode-core/src/integrationTest/resources/org/apache/geode/codeAnalysis/sanctionedDataSerializables.txt
> {code}
> The prefix on the second path was:
> {code}
> /Users/bburcham/Projects/geode/geode-core/build/resources
> {code}
> but needed to be:
> {code}
> /Users/bburcham/Projects/geode/geode-core/src/integrationTest/resources
> {code}
> h2. Reproduction
> To reproduce this, modify some {{toData}} on some serializable class in the
> {{geode-core}} module e.g. {{RegionVersionVector}}, by adding some innocuous
> code like:
> {code}
> System.out.println("hi!");
> {code}
> And then run:
> {code}
> $ ./gradlew :geode-core:integrationTest
> --tests=AnalyzeCoreSerializablesJUnitTest
> {code}
> You'll see the an advice block like the one I provided above and you'll see
> the incorrect destination directory.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)