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

[#2265][#2267]Fix outdated suggested solution for backend Task 1 #2268

Merged

Conversation

lyuanww
Copy link
Contributor

@lyuanww lyuanww commented Jan 21, 2025

Fixes #2265
Fixes #2267

Proposed commit message

Fix outdated suggested solution for backend Task 1.

The suggested solution for backend Task 1 in Developer Guide under
Learning the Basics is currently outdated due to past refactoring.

Let's update the documentation for backend Task 1.

@lyuanww lyuanww changed the title Fix outdated suggested solution docs [WIP] Fix outdated suggested solution docs Jan 22, 2025
@lyuanww lyuanww marked this pull request as draft January 23, 2025 07:01
@lyuanww lyuanww changed the title [WIP] Fix outdated suggested solution docs Fix outdated suggested solution docs Jan 25, 2025
@lyuanww lyuanww marked this pull request as ready for review January 25, 2025 09:42
@lyuanww lyuanww requested a review from a team January 27, 2025 16:23
docs/dg/learningBasics.md Show resolved Hide resolved
.registerTypeAdapter(FileType.class, new FileType.FileTypeSerializer());
.registerTypeAdapter(FileType.class, new FileType.FileTypeSerializer())
.registerTypeAdapter(ZoneId.class, (JsonSerializer<ZoneId>) (zoneId, typeOfSrc, context)
-> new JsonPrimitive(zoneId.toString()));
Copy link
Contributor

Choose a reason for hiding this comment

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

The serialization of zoneId has been updated.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For this change, I think it will be better to update on your PR. I will keep an eye on which PR is merged first

Copy link
Member

Choose a reason for hiding this comment

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

yup please change it alongside your PR @CYX22222003 since this is an easy change, lets keep it scoped correctly


1. Add the following content to `CliArguments` to include `isPrettyPrintingUsed` as a new attribute to the class.

```java
protected boolean isPrettyPrintingUsed;
Copy link
Contributor

Choose a reason for hiding this comment

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

is there any specific reason that we should change the access modifier to private

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think the protected is already changed into private due to refactoring.

Copy link
Contributor

Choose a reason for hiding this comment

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

I apologise for my lack of familiarity with the code, but can you point out for me when the refactoring occurred? I can't seem to find the commit...

Copy link
Member

Choose a reason for hiding this comment

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

you can change this to private since other arguments in CliArguments are using private; this will make it more uniform

Copy link
Member

Choose a reason for hiding this comment

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

@sopa301 sopa301 requested a review from a team January 31, 2025 14:42

1. Add the following content to `CliArguments` to include `isPrettyPrintingUsed` as a new attribute to the class.

```java
protected boolean isPrettyPrintingUsed;
Copy link
Member

Choose a reason for hiding this comment

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

you can change this to private since other arguments in CliArguments are using private; this will make it more uniform

.registerTypeAdapter(FileType.class, new FileType.FileTypeSerializer());
.registerTypeAdapter(FileType.class, new FileType.FileTypeSerializer())
.registerTypeAdapter(ZoneId.class, (JsonSerializer<ZoneId>) (zoneId, typeOfSrc, context)
-> new JsonPrimitive(zoneId.toString()));
Copy link
Member

Choose a reason for hiding this comment

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

yup please change it alongside your PR @CYX22222003 since this is an easy change, lets keep it scoped correctly

Copy link
Contributor

@sopa301 sopa301 left a comment

Choose a reason for hiding this comment

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

Good work on your first PR! A few minor nitpicks:

  1. Since both issues are concerning the same task (updating the outdated docs that contain deprecated classes), it would be cleaner to merge the issues in the future, though that's just my preference.
  2. It might be more convenient for future members if the commit message body could briefly explain why the docs are being updated.
  3. The naming of the PR title should follow the convention [#ISSUE_NUMBER] (short brief of PR)


1. Add the following content to `CliArguments` to include `isPrettyPrintingUsed` as a new attribute to the class.

```java
protected boolean isPrettyPrintingUsed;
Copy link
Contributor

Choose a reason for hiding this comment

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

I apologise for my lack of familiarity with the code, but can you point out for me when the refactoring occurred? I can't seem to find the commit...

@sikai00
Copy link
Member

sikai00 commented Jan 31, 2025

reiterating with @sopa301 on point 1, you can edit the issue to add on to the tasks to resolve since they are both in the same overarching theme of "outdated DG for learning the basics" rather than creating two separate issues, it can make the issues board "unhygenic" and cluttered over time

Since the issues are already created it is fine, we will close both issues once the PR is merged, but do take note in the future.

Reiterating on @sopa301 's point 3, we will only merge the PR after the relevant conventions has been complied to so do make the changes!

@lyuanww lyuanww changed the title Fix outdated suggested solution docs [#2265][#2267]Fix outdated suggested solution docs Feb 1, 2025
@lyuanww lyuanww changed the title [#2265][#2267]Fix outdated suggested solution docs [#2265][#2267]Fix outdated suggested solution for backend Task 1 Feb 1, 2025
@sikai00 sikai00 merged commit 4abd7f4 into reposense:master Feb 1, 2025
11 checks passed
Copy link
Contributor

github-actions bot commented Feb 1, 2025

The following links are for previewing this pull request:

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

Successfully merging this pull request may close these issues.

Hints containing outdated classes in the developer guide Outdated suggested solution in developer guide
4 participants