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

Fixes #23: Updated- lib/sugar-web #24

Merged
merged 2 commits into from
Dec 22, 2024

Conversation

ravjot07
Copy link
Contributor

@ravjot07 ravjot07 commented Dec 3, 2024

closes issue #23

Signed-off-by: Ravjot Singh <[email protected]>
@quozl
Copy link
Contributor

quozl commented Dec 3, 2024

Thanks. Can you tell me why Gruntfile.js and README.md differ between 4f905c7 and the sugar-web repository? Is a change needed to sugar-web repository?

@ravjot07
Copy link
Contributor Author

ravjot07 commented Dec 6, 2024

Thanks. Can you tell me why Gruntfile.js and README.md differ between 4f905c7 and the sugar-web repository? Is a change needed to sugar-web repository?

@quozl this changes were made in updated package of suger-web itself

@quozl
Copy link
Contributor

quozl commented Dec 6, 2024

That's not what I see when I look at sugar-web.

@ravjot07
Copy link
Contributor Author

ravjot07 commented Dec 7, 2024

That's not what I see when I look at sugar-web.

@quozl i have checked this Gruntfile.js in this repo was 11 years old that means these file was changed in sugar web as they are updated 10 year ago and content of these file are same with that on sugar-web repo (Readme.md and Gruntfile.js)

@quozl
Copy link
Contributor

quozl commented Dec 7, 2024

Interesting, but my method was different.

cd /tmp
git clone [email protected]:sugarlabs/connect-the-dots-activity.git
cd connect-the-dots-activity
git fetch origin pull/24/head
git checkout -b pr24-review 4f905c7

cd /tmp
git clone [email protected]:sugarlabs/sugar-web.git

diff -u sugar-web/Gruntfile.js \
    connect-the-dots-activity/lib/sugar-web/Gruntfile.js

Result is different files; that's what I'm expecting you to explain; which file is right, and if it is the file in this repository, can you please ensure that the file in the other repository is updated? Repeat the analysis for README.md.

Here's the diff output;

--- sugar-web/Gruntfile.js      2024-12-07 16:01:38.490227341 +1100
+++ connect-the-dots-activity/lib/sugar-web/Gruntfile.js        2024-12-07 16:00:49.277967089 +1100
@@ -1,3 +1,4 @@
+define(function (require, exports, module) {
 var which = require('which');
 
 module.exports = function (grunt) {
@@ -60,3 +61,5 @@
     grunt.registerTask('default', ['jsbeautifier', 'jshint', 'test']);
 
 };
+
+});
\ No newline at end of file

@ravjot07
Copy link
Contributor Author

ravjot07 commented Dec 7, 2024

Interesting, but my method was different.

cd /tmp
git clone [email protected]:sugarlabs/connect-the-dots-activity.git
cd connect-the-dots-activity
git fetch origin pull/24/head
git checkout -b pr24-review 4f905c7

cd /tmp
git clone [email protected]:sugarlabs/sugar-web.git

diff -u sugar-web/Gruntfile.js \
    connect-the-dots-activity/lib/sugar-web/Gruntfile.js

Result is different files; that's what I'm expecting you to explain; which file is right, and if it is the file in this repository, can you please ensure that the file in the other repository is updated? Repeat the analysis for README.md.

Here's the diff output;

--- sugar-web/Gruntfile.js      2024-12-07 16:01:38.490227341 +1100
+++ connect-the-dots-activity/lib/sugar-web/Gruntfile.js        2024-12-07 16:00:49.277967089 +1100
@@ -1,3 +1,4 @@
+define(function (require, exports, module) {
 var which = require('which');
 
 module.exports = function (grunt) {
@@ -60,3 +61,5 @@
     grunt.registerTask('default', ['jsbeautifier', 'jshint', 'test']);
 
 };
+
+});
\ No newline at end of file

@quozl i used volo to update sugar-web
volo add -f sugarlabs/sugar-web lib/sugar-web
Sir readme is the same but for gruntfile.js the only difference is with define(function (require, exports, module) {};
This line wraps the entire Gruntfile.js in a define function, suggesting the file has been modularized to be compatible with an AMD loader like RequireJS. I think addition using volo automatically made it compatible for integration with AMD/RequireJS, which might be necessary for this activity's structure. I think this version is better suitable for this activity

@quozl
Copy link
Contributor

quozl commented Dec 7, 2024

Is the file necessary for run-time?

@ravjot07
Copy link
Contributor Author

ravjot07 commented Dec 7, 2024

Contributor

No, the Gruntfile.js file is not necessary for runtime. It is a build and development tool configuration file, and its primary purpose is to automate tasks during development.

@quozl
Copy link
Contributor

quozl commented Dec 7, 2024

Thanks. Is the file necessary for development or is it automatically regenerated?

@ravjot07
Copy link
Contributor Author

ravjot07 commented Dec 8, 2024

Is the file necessary for development or is it automatically regenerated?

Its necessary for development in most cases unless explicitly replaced by another build tool or process. However, it is not automatically regenerated unless there is a script or tool in place to recreate it.

@quozl
Copy link
Contributor

quozl commented Dec 8, 2024

Thanks. I've read Grunt on Wikipedia. Gruntfile.js is a configuration file for software tools that are external to this repository. It doesn't seem necessary for development unless those tools are used. I don't think we should retain such files unless there is a reason to do so. Should the Gruntfile.js in sugar-web repository be changed or removed? It is different, as mentioned. I've looked at other Gruntfile.js in sugarlabs and the function header is not present. There are so few such files. So why do you want the file and header present? I'm asking you because you added them to commit.

@ravjot07
Copy link
Contributor Author

ravjot07 commented Dec 8, 2024

Thanks. I've read Grunt on Wikipedia. Gruntfile.js is a configuration file for software tools that are external to this repository. It doesn't seem necessary for development unless those tools are used. I don't think we should retain such files unless there is a reason to do so. Should the Gruntfile.js in sugar-web repository be changed or removed? It is different, as mentioned. I've looked at other Gruntfile.js in sugarlabs and the function header is not present. There are so few such files. So why do you want the file and header present? I'm asking you because you added them to commit.

i thought it might be better it might be better to have this file with function header. Should i remove it in next commit ?

@quozl
Copy link
Contributor

quozl commented Dec 8, 2024

Why might it be better?

@ravjot07
Copy link
Contributor Author

ravjot07 commented Dec 9, 2024

Why might it be better?

generally its better to have this file because it saves time, provides consistency, and ensures that tasks crucial to the project (e.g., building, testing, linting) are performed correctly and efficiently. But in this activity with current scope of this project we can remove this also

@ravjot07
Copy link
Contributor Author

Why might it be better?

generally its better to have this file because it saves time, provides consistency, and ensures that tasks crucial to the project (e.g., building, testing, linting) are performed correctly and efficiently. But in this activity with current scope of this project we can remove this also

@quozl whats your take on this file should we remove this file or keep this sir? i will add a other commit accordingly

@quozl
Copy link
Contributor

quozl commented Dec 12, 2024

Sorry, I don't know. I'm not convinced the file should be included, because

  • it is new and we have not needed it before,
  • it is not required at run-time, and we usually want to bundle as little as possible in the .xo file that is downloaded,
  • it can be regenerated,
  • other Sugar activities do not have the file,
  • Sugarizer has only one such file, not per activity.

@ravjot07
Copy link
Contributor Author

Sorry, I don't know. I'm not convinced the file should be included, because

  • it is new and we have not needed it before,
  • it is not required at run-time, and we usually want to bundle as little as possible in the .xo file that is downloaded,
  • it can be regenerated,
  • other Sugar activities do not have the file,
  • Sugarizer has only one such file, not per activity.

@quozl sure sir, i will remove this file

Signed-off-by: Ravjot Singh <[email protected]>
@ravjot07
Copy link
Contributor Author

Sorry, I don't know. I'm not convinced the file should be included, because

  • it is new and we have not needed it before,
  • it is not required at run-time, and we usually want to bundle as little as possible in the .xo file that is downloaded,
  • it can be regenerated,
  • other Sugar activities do not have the file,
  • Sugarizer has only one such file, not per activity.

@quozl i have removed this file, now we can merge this PR.

@ravjot07
Copy link
Contributor Author

Sorry, I don't know. I'm not convinced the file should be included, because

  • it is new and we have not needed it before,
  • it is not required at run-time, and we usually want to bundle as little as possible in the .xo file that is downloaded,
  • it can be regenerated,
  • other Sugar activities do not have the file,
  • Sugarizer has only one such file, not per activity.

@quozl i have removed this file, now we can merge this PR.

@quozl if there are no further changes then we could merge this pr

@quozl quozl merged commit 0ba25a8 into sugarlabs:master Dec 22, 2024
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