Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
- [ai-ide] removed `WorkspaceFunctionScope.ensureWithinWorkspace(targetUri, workspaceRootUri)`. Every path-taking AI tool now resolves and checks its argument through `WorkspaceFunctionScope.resolveAccessiblePath(pathOrUri)`, which in addition to the workspace roots accepts locations covered by the `ai-features.workspaceFunctions.allowedExternalPaths` preference or contributed via the new `AccessibleRootContribution`. Adopters that called `ensureWithinWorkspace`, or `resolveRelativePath` followed by their own boundary check, should call `resolveAccessiblePath` instead [#17865](https://github.com/eclipse-theia/theia/pull/17865)
- [core] added `onWindowLoaded` to the `SecondaryWindowService` interface; adopters implementing the interface from scratch (rather than extending `DefaultSecondaryWindowService`) must provide it [#17874](https://github.com/eclipse-theia/theia/pull/17874)
- [core] many classes now inject `ILogger` in place of their raw `console` calls, so every container resolving them must provide it. This mainly affects tests, which can add `bind(ILogger).to(MockLogger)` using `MockLogger` from `@theia/core/lib/common/test/mock-logger` [#17763](https://github.com/eclipse-theia/theia/pull/17763)
- [filesystem] `WatchOptions.recursive` is now honored by the backend watcher service, where it was previously ignored and every request became a recursive `@parcel/watcher` subscription. Non-recursive requests are served by a new `NodeDirectoryWatcher` that watches a single directory level with `fs.watch`, and requests resolving to the same directory share one watcher. `ParcelFileSystemWatcherService` is renamed to `FileSystemWatcherServiceImpl` and `PacelWatcherHandle` to `WatcherHandle`, both keeping a deprecated alias; the `watchers` map now holds a `WatcherInstance` of either kind, so adopters overriding `createWatcher` or `getWatcherKey`, or reading `watchers`, should check the new signatures [#17875](https://github.com/eclipse-theia/theia/pull/17875)
- [monaco] removed the `protected secondaryWindowHandler` field from `MonacoFrontendApplicationContribution`; the Monaco theme stylesheet is now injected into every secondary window via `SecondaryWindowService.onWindowLoaded` [#17874](https://github.com/eclipse-theia/theia/pull/17874)
- [plugin-ext] aliased `DebuggerContribution` to `PluginPackageDebuggersContribution` [#17758](https://github.com/eclipse-theia/theia/pull/17758)
- [plugin-ext] changed `Keybinding.args` from `any` to `unknown` [#17758](https://github.com/eclipse-theia/theia/pull/17758)
Expand All @@ -27,6 +28,7 @@
- [plugin-ext] moved `loadManifest` and `updateActivationEvents` to `@theia/plugin-utils` [#17758](https://github.com/eclipse-theia/theia/pull/17758)
- [plugin-ext] rejected grammar paths outside the plugin directory [#17758](https://github.com/eclipse-theia/theia/pull/17758)
- [plugin-ext] removed `buildFrontendModuleName` from `plugin-protocol` [#17758](https://github.com/eclipse-theia/theia/pull/17758)
- [plugin-ext] removed the `workspaceService` constructor parameter and the `shouldSkipWatch` method from `MainFileSystemEventService`. They implemented a mitigation that dropped non-recursive plugin watches rooted above a workspace root, which is obsolete now that the backend honors `recursive` [#17875](https://github.com/eclipse-theia/theia/pull/17875)
- [preferences] removed the `protected scopeTracker` field from `PreferencesContribution`, so the Settings widget is no longer constructed on startup. Adopters should read the scope via the new `protected currentScope` getter [#17877](https://github.com/eclipse-theia/theia/pull/17877)
- [scm] widened `ScmHistoryItem.tooltip` from `string` to `string | MarkdownString | readonly MarkdownString[]`, so that hovers supplied by a history provider keep their `isTrusted` command allow-list and their multi-section form; adopters reading the field as a string must narrow it [#17880](https://github.com/eclipse-theia/theia/pull/17880)
- [scm-extra] deprecated the `@theia/scm-extra` extension and stopped publishing it on npm; it has also been removed from the example applications, which drops its `SCM History` view, the `History` context menu items in the navigator and editor, and the `alt+h` keybinding. The view has been non-functional in the default application since the removal of `@theia/git`, as nothing implements `ScmHistorySupport` anymore. Please use the SCM history graph in `@theia/scm` for branch history and the Timeline view in `@theia/timeline` for per-file history instead [#17882](https://github.com/eclipse-theia/theia/pull/17882)
Expand Down
4 changes: 4 additions & 0 deletions packages/filesystem/src/common/filesystem-watcher-protocol.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ export interface FileSystemWatcherClient {

export interface WatchOptions {
ignored: string[];
/**
* Watch the whole subtree under the given path. Defaults to `true`.
*/
recursive?: boolean;
}
export interface FileChange {
uri: string;
Expand Down
3 changes: 2 additions & 1 deletion packages/filesystem/src/node/disk-file-system-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -833,7 +833,8 @@ export class DiskFileSystemProvider implements Disposable,
};
watcherService.watchFileChanges(resource.toString(), {
// Convert from `files.WatchOptions` to internal `watcher-protocol.WatchOptions`:
ignored: opts.excludes
ignored: opts.excludes,
recursive: opts.recursive
}).then(watcherId => {
if (handle.disposed) {
watcherService.unwatchFileChanges(watcherId);
Expand Down
8 changes: 4 additions & 4 deletions packages/filesystem/src/node/filesystem-backend-module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { ContainerModule, interfaces } from '@theia/core/shared/inversify';
import { ConnectionHandler, RpcConnectionHandler, ILogger } from '@theia/core/lib/common';
import { FileSystemWatcherServer, FileSystemWatcherService } from '../common/filesystem-watcher-protocol';
import { FileSystemWatcherServerClient } from './filesystem-watcher-client';
import { ParcelFileSystemWatcherService, ParcelFileSystemWatcherServerOptions } from './parcel-watcher/parcel-filesystem-service';
import { FileSystemWatcherServiceImpl, ParcelFileSystemWatcherServerOptions } from './parcel-watcher/parcel-filesystem-service';
import { NodeFileUploadService } from './upload/node-file-upload-service';
import { ParcelWatcherOptions } from './parcel-watcher/parcel-options';
import { DiskFileSystemProvider } from './disk-file-system-provider';
Expand All @@ -38,11 +38,11 @@ export const WATCHER_VERBOSE = process.argv.includes('--watcher-verbose');

export const FileSystemWatcherServiceProcessOptions = Symbol('FileSystemWatcherServiceProcessOptions');
/**
* Options to control the way the `ParcelFileSystemWatcherService` process is spawned.
* Options to control the way the `FileSystemWatcherServiceImpl` process is spawned.
*/
export interface FileSystemWatcherServiceProcessOptions {
/**
* Path to the script that will run the `ParcelFileSystemWatcherService` in a new process.
* Path to the script that will run the `FileSystemWatcherServiceImpl` in a new process.
*/
entryPoint: string;
}
Expand Down Expand Up @@ -102,7 +102,7 @@ export function bindFileSystemWatcherServer(bind: interfaces.Bind): void {
export function createParcelFileSystemWatcherService(ctx: interfaces.Context): FileSystemWatcherService {
const options = ctx.container.get<ParcelFileSystemWatcherServerOptions>(ParcelFileSystemWatcherServerOptions);
const dispatcher = ctx.container.get<FileSystemWatcherServiceDispatcher>(FileSystemWatcherServiceDispatcher);
const server = new ParcelFileSystemWatcherService(options);
const server = new FileSystemWatcherServiceImpl(options);
server.setClient(dispatcher);
return server;
}
Expand Down
Loading
Loading