node icon indicating copy to clipboard operation
node copied to clipboard

doc, test: update --watch for linux recursive watch

Open avivkeller opened this issue 1 year ago β€’ 9 comments

Follow-up #45098

This PR removes the unused error code ERR_FEATURE_UNAVAILABLE_ON_PLATFORM, and stops skipping some of the watch mode tests on Linux machines.

avivkeller avatar Oct 03 '24 20:10 avivkeller

I'm a bit surprised ERR_FEATURE_UNAVAILABLE_ON_PLATFORM is now unused -- I was under the impression that watch mode still doesn't work on e.g. IBM i (most watch tests skip) and at one point that error was returned there.

cc @nodejs/platform-ibmi

richardlau avatar Oct 03 '24 20:10 richardlau

If you search for the error, it's only mentioned in the docs and defined in errors.js, it is never thrown.

avivkeller avatar Oct 03 '24 20:10 avivkeller

If you search for the error, it's only mentioned in the docs and defined in errors.js, it is never thrown.

I can see that, but I'm questioning whether the code was changed to not throw the error anymore on all platforms despite watch not working on IBM i -- AFAIK it's a system limitation there.

richardlau avatar Oct 03 '24 20:10 richardlau

Codecov Report

:white_check_mark: All modified and coverable lines are covered by tests. :white_check_mark: Project coverage is 88.41%. Comparing base (1d5ed72) to head (a0719b8). :warning: Report is 3112 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #55256      +/-   ##
==========================================
- Coverage   88.41%   88.41%   -0.01%     
==========================================
  Files         652      652              
  Lines      186572   186585      +13     
  Branches    36045    36061      +16     
==========================================
+ Hits       164957   164967      +10     
+ Misses      14899    14887      -12     
- Partials     6716     6731      +15     
Files with missing lines Coverage Ξ”
lib/internal/errors.js 96.98% <ΓΈ> (-0.01%) :arrow_down:

... and 49 files with indirect coverage changes

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

codecov[bot] avatar Oct 03 '24 21:10 codecov[bot]

FWIW the tests are skipped on IBMi

avivkeller avatar Oct 04 '24 18:10 avivkeller

@richardlau

Looks like calling fs.watch on IBM i returns ENOSYS.

const fs = require('fs');

fs.watch('dummy', (eventType, filename) => {
  console.log(`event type is: ${eventType}`);
  if (filename) {
    console.log(`filename provided: ${filename}`);
  } else {
    console.log('filename not provided');
  }
});
Error: ENOSYS: function not implemented, watch 'dummy'

I'm not sure if ever returned ERR_FEATURE_UNAVAILABLE_ON_PLATFORM in the past but currently ENOSYS is being returned.

abmusse avatar Oct 07 '24 15:10 abmusse

Maybe I misremembered then. 🀷

richardlau avatar Oct 07 '24 15:10 richardlau

I've added https://github.com/nodejs/node/labels/dont-land-on-v18.x as #45098 didn't land on that release line. If you could review it would be appreciated :-)

avivkeller avatar Nov 03 '24 22:11 avivkeller

Bump for reviews

avivkeller avatar May 12 '25 11:05 avivkeller