개발자로 진로를 정하고, 스프링을 사용하며 가지게 된 작지만 큰 목표가 있었다.
그건 바로 오픈소스에 기여하기였다.
본인이 알고있던 오픈소스 컨트리뷰션은 정말 뛰어난, 손에 꼽는 똑똑한 사람들이나 하는 활동이었다.
그래서 그저 언젠간 하고싶은 목표로만 존재했었다.
그러나 스프링 공부를 하며 어떻게 동작 하는지에 대해 궁금할 때가 꽤나 있어 해당 클래스를 살펴보다 우연히 발견한 코드를 보고 '이거라면 나도 컨트리뷰션 할 수 있겠다' 라는 생각이 들어 PR을 날려보기로 결심했다.
먼저 리포지토리를 포크 해와야 한다.
포크한 리포지토리를 IDE로 열어 수정하고자 하는 부분을 수정한다.
본인의 경우 Configurations 클래스에 중복된 null 체크 로직을 발견했고 이를 수정했다.
// 변경 전
protected Configurations(UnaryOperator<Collection<Class<?>>> sorter, Collection<Class<?>> classes,
Function<Class<?>, String> beanNameGenerator) {
Assert.notNull(classes, "Classes must not be null");
sorter = (sorter != null) ? sorter : UnaryOperator.identity();
Collection<Class<?>> sorted = sorter.apply(classes);
this.sorter = (sorter != null) ? sorter : UnaryOperator.identity();;
this.classes = Collections.unmodifiableSet(new LinkedHashSet<>(sorted));
this.beanNameGenerator = beanNameGenerator;
}
// 변경 후
protected Configurations(UnaryOperator<Collection<Class<?>>> sorter, Collection<Class<?>> classes,
Function<Class<?>, String> beanNameGenerator) {
Assert.notNull(classes, "Classes must not be null");
sorter = (sorter != null) ? sorter : UnaryOperator.identity();
Collection<Class<?>> sorted = sorter.apply(classes);
this.sorter = sorter;
this.classes = Collections.unmodifiableSet(new LinkedHashSet<>(sorted));
this.beanNameGenerator = beanNameGenerator;
}
변경 후 커밋, 푸시를 하고 본인의 리포지토리로 이동한다.
Pull Request 항목으로 이동하여 New Pull Request, Create Pull Request를 클릭 후 PR을 작성한다.
본인은 아래와 같이 작성했다.
오픈소스 컨트리뷰션이 처음이라면 작성한 PR 밑에 라이센스 등록을 위한 코멘트가 달린다.
Contributor License Agreement
를 클릭하여 컨트리뷰터 라이센스 등록을 해준다.
개인이 등록하는 경우엔 왼쪽의 Sign Individual CLA
를 클릭한다.
이제 PR 결과를 기다리기만 하면 된다!
본인의 경우엔 Approve
되었고, 스프링부트 3.4.1 버전에 릴리즈 될 예정이다.
항상 이 거대한 개발 생태계에 미약한 영향력이라도 끼쳐보는 게 작은 소망이었는데, 아주 미세한 티끌만한 발자국을 남길 수 있게 된 것 같아 감회가 새롭다.
다시금 동기부여 할 수 있는 계기가 되었고, 앞으로 더욱 큰 영향력을 끼칠 수 있는 사람이 될 수 있으면 좋겠다!