Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move PICO to EISOP #1013

Open
wants to merge 45 commits into
base: master
Choose a base branch
from
Open

Move PICO to EISOP #1013

wants to merge 45 commits into from

Conversation

Ao-senXiong
Copy link
Member

@Ao-senXiong Ao-senXiong commented Dec 9, 2024

Original code repo: https://github.com/opprop/immutability
Some of commits are presented in: https://github.com/Ao-senXiong/immutability/tree/pico-cf-only
Merge with: eisop/jdk#106
As discussed before, I will try to move PICO here gradually. Hopefully adding test cases and Javadoc with more discussion as well.

Co-authored-by: Werner Dietl <wdietl@gmail.com>
Co-authored-by: Haifeng Shi <shihaifeng1998@gmail.com>
Co-authored-by: Weitian Xing <xingweitian@gmail.com>
Co-authored-by: Jeff Luo <j36luo@uwaterloo.ca>
Co-authored-by: Mier Ta <m2ta@uwaterloo.ca>
Copy link
Member

@wmdietl wmdietl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A quick round of initial comments.

PICOViewpointAdapter vpa = atypeFactory.getViewpointAdapter();
AnnotationMirror adapted = vpa.combineAnnotationWithAnnotation(lhs, rhs);
return atypeFactory.getQualifierHierarchy().isSubtypeQualifiersOnly(adapted, lhs);
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After #1032, this method and the override of isValidUse( AnnotatedDeclaredType declarationType, AnnotatedDeclaredType useType, Tree tree) can be removed.


this.assignableReadonlyField = rdmObject;
// :: error: (assignment.type.incompatible) :: error: (illegal.field.write)
this.rdmField = rdmObject; // Field is adpated to immutable but method parameters are not?
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is wrong, method parameter should also be adapted. #1037

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

visitMethod is getting its oracle in AnnotatedExecutableType methodType = atypeFactory.getAnnotatedType(tree).deepCopy();. It should get adapated version of the original method signature.

@Ao-senXiong
Copy link
Member Author

Ao-senXiong commented Dec 31, 2024

Ah, looks like it can not find the branch again.
Fixed

@Ao-senXiong
Copy link
Member Author

Ao-senXiong commented Dec 31, 2024

Looks like the CI issue not only happens for this PR, also for #1034. It did not fail because it does not have other related PR and fallback to master branches works fine.
Fixed

@Ao-senXiong
Copy link
Member Author

Ao-senXiong commented Dec 31, 2024

I notice the problem is CI_org is set to eisop and echo About to run git-find-fork eisop eisop jdk. So the branch is not found.

In github action, we should use the following:
GITHUB_ACTOR=Ao-senXiong

Fixed.

@Ao-senXiong
Copy link
Member Author

I think we have to bear the windows failure as the script does not support windows

++ /d/a/checker-framework/checker-framework/checker/bin-devel/.git-scripts/git-find-fork Ao-senXiong eisop jdk
+ '[' 3 -ne 3 ']'
+ ORG=Ao-senXiong
+ UPSTREAM_ORG=eisop
+ REPONAME=jdk
+ export 'GITEXISTS=wget -q --spider'
+ GITEXISTS='wget -q --spider'
+ wget -q --spider https://github.com/Ao-senXiong/jdk.git
/d/a/checker-framework/checker-framework/checker/bin-devel/.git-scripts/git-find-fork: line 29: wget: command not found
+ OWNER=eisop
+ echo https://github.com/eisop/jdk.git
+ REPO_URL=https://github.com/eisop/jdk.git
+ '[' -n 1 ']'
git-find-fork Ao-senXiong eisop jdk => https://github.com/eisop/jdk.git
+ echo 'git-find-fork Ao-senXiong eisop jdk => https://github.com/eisop/jdk.git'
+ '[' -n 1 ']'
+ echo 'About to run git-find-branch' https://github.com/eisop/jdk.git pico-move
About to run git-find-branch https://github.com/eisop/jdk.git pico-move
++ /d/a/checker-framework/checker-framework/checker/bin-devel/.git-scripts/git-find-branch https://github.com/eisop/jdk.git pico-move
+ REPO_URL=https://github.com/eisop/jdk.git
+ shift
+ for BRANCH in "$@"
+ git ls-remote --quiet --exit-code --heads https://github.com/eisop/jdk.git pico-move
+ git ls-remote --symref https://github.com/eisop/jdk.git HEAD
+ awk '/^ref:/ {sub(/refs\/heads\//, "", $2); print $2}'
+ REPO_BRANCH=master
+ '[' -n 1 ']'
+ echo 'git-find-branch https://github.com/eisop/jdk.git pico-move => master'
+ '[' https://github.com/eisop/jdk.git '!=' https://github.com/eisop/jdk.git ']'
git-find-branch https://github.com/eisop/jdk.git pico-move => master
+ echo 'About to run: git clone -b master -q --single-branch --depth 1 https://github.com/eisop/jdk.git ../jdk'
+ timeout 60 git clone --depth 1 -b master -q --single-branch --depth 1 https://github.com/eisop/jdk.git ../jdk
About to run: git clone -b master -q --single-branch --depth 1 https://github.com/eisop/jdk.git ../jdk```

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants