RFC: removing an unknown feature (bsb auto-populate files field)


#1

Hi all, there is a not widely known feature that we plan to remove, it should not be a breaking change.

currently there are 3 modes when specifying files field as below:

"sources": {
    "dir" : "src",
    "files" : [ "file1.re", "file2.re" ]                
  },
"sources": {
    "dir" : "src",
    // left blank so all valid modules
  },
"sources": {
    "dir" : "src",
    "files" : [  ]   // empty             
  },

The first two modes are obvious, the last one, when bsb saw it, it currently will overwrite bsconfig.json and populate it with files and in the next run it will go into first mode.

In practice, most people will simply use the second mode, given the complexity needed to maintain the third mode, we are considering to remove such support, so it will be interpreted as the first mode.

For people who are affected by this change, ( I doubt if there is any), just run bsb once, and stick with the first mode, then you should be good.


#2

I never know about third mode and I don’t think bsb should edit bsconfig in any way.


#3

I agree that it’s not a breaking change – no projects that are currently building with bsb will begin to break after this change. The only conceivable issue would be if there’s some higher-level tool that’s running bsb and depending on this behavior, and I’m not aware of any that do.