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

Add project dependencies to context #124

Open
joao10lima opened this issue Dec 21, 2021 · 0 comments · May be fixed by #137
Open

Add project dependencies to context #124

joao10lima opened this issue Dec 21, 2021 · 0 comments · May be fixed by #137
Assignees
Labels
A: Plugin - Platform Area: continuous integration platform plugins T: Enhancement Type: an enhancement to an existing feature

Comments

@joao10lima
Copy link
Contributor

Context

Today Pipelinit uses a specific function to check the project's dependencies during the plugin introspection, by calling this inside a project plugin it can lead to multiples calls of a file parsing which can slow the introspection in addition to the disorganization that is created by having multiples dependencies functions inside each plugin with a similar code.

Goals

  • Get the project dependencies before the plugins introspection
  • Add project dependencies to context
@joao10lima joao10lima added A: Plugin - Platform Area: continuous integration platform plugins T: Enhancement Type: an enhancement to an existing feature labels Dec 21, 2021
@joao10lima joao10lima self-assigned this Dec 21, 2021
joao10lima added a commit that referenced this issue Jan 3, 2022
As explained on the issue #124
This commit adds the projects dependencies list on the plugin context

Before:
```typescript
import { hasRubyDependency } from "./dependencies.ts";

const isDependency = await hasRubyDependency(context, "rubocop");
```
At every import and function call the application would go on the
dependencies files(package.json, Pipfile, etc ...) and search
the requested dependencies. This makes the application more slower
and disorganized the function code.

After:
```typescript
const isDependency = await context.dependencies.includes("rubocop");
```
Now the dependency list is loaded before the introspection and
only need to read the necessary dependencies files once.

Resolves: #124
joao10lima added a commit that referenced this issue Jan 3, 2022
As explained on the issue #124
This commit adds the projects dependencies list on the plugin context

Before:
```typescript
import { hasRubyDependency } from "./dependencies.ts";

const isDependency = await hasRubyDependency(context, "rubocop");
```
At every import and function call the application would go on the
dependencies files(package.json, Pipfile, etc ...) and search for
the requested dependencies. This made the application very slow
in addition to harming the organization of the code with many unnecessary imports.

After:
```typescript
const isDependency = await context.dependencies.includes("rubocop");
```
Now the dependency list is loaded before the introspection and
only need to read the necessary dependencies files once.

Resolves: #124
@joao10lima joao10lima linked a pull request Jan 3, 2022 that will close this issue
joao10lima added a commit that referenced this issue Jan 3, 2022
As explained on the issue #124
This commit adds the projects dependencies list on the plugin context

Before:
```typescript
import { hasRubyDependency } from "./dependencies.ts";

const isDependency = await hasRubyDependency(context, "rubocop");
```
At every import and function call the application would go on the
dependencies files(package.json, Pipfile, etc ...) and search for
the requested dependencies. This made the application very slow
in addition to harming the organization of the code with many unnecessary imports.

After:
```typescript
const isDependency = await context.dependencies.includes("rubocop");
```
Now the dependency list is loaded before the introspection and
only need to read the necessary dependencies files once.

Resolves: #124
joao10lima added a commit that referenced this issue Jan 4, 2022
As explained on the issue #124
This commit adds the projects dependencies list on the plugin context

Before:
```typescript
import { hasRubyDependency } from "./dependencies.ts";

const isDependency = await hasRubyDependency(context, "rubocop");
```
At every import and function call the application would go on the
dependencies files(package.json, Pipfile, etc ...) and search for
the requested dependencies. This made the application very slow
in addition to harming the organization of the code with many unnecessary imports.

After:
```typescript
const isDependency = await context.dependencies.includes("rubocop");
```
Now the dependency list is loaded before the introspection and
only need to read the necessary dependencies files once.

Resolves: #124
joao10lima added a commit that referenced this issue Jan 10, 2022
As explained on the issue #124
This commit adds the projects dependencies list on the plugin context

Before:
```typescript
import { hasRubyDependency } from "./dependencies.ts";

const isDependency = await hasRubyDependency(context, "rubocop");
```
At every import and function call the application would go on the
dependencies files(package.json, Pipfile, etc ...) and search for
the requested dependencies. This made the application very slow
in addition to harming the organization of the code with many unnecessary imports.

After:
```typescript
const isDependency = await context.dependencies.includes("rubocop");
```
Now the dependency list is loaded before the introspection and
only need to read the necessary dependencies files once.

Resolves: #124
joao10lima added a commit that referenced this issue Jan 10, 2022
As explained on the issue #124
This commit adds the projects dependencies list on the plugin context

Before:
```typescript
import { hasRubyDependency } from "./dependencies.ts";

const isDependency = await hasRubyDependency(context, "rubocop");
```
At every import and function call the application would go on the
dependencies files(package.json, Pipfile, etc ...) and search for
the requested dependencies. This made the application very slow
in addition to harming the organization of the code with many unnecessary imports.

After:
```typescript
const isDependency = await context.dependencies.includes("rubocop");
```
Now the dependency list is loaded before the introspection and
only need to read the necessary dependencies files once.

Resolves: #124
joao10lima added a commit that referenced this issue Jan 18, 2022
As explained on the issue #124
This commit adds the projects dependencies list on the plugin context

Before:
```typescript
import { hasRubyDependency } from "./dependencies.ts";

const isDependency = await hasRubyDependency(context, "rubocop");
```
At every import and function call the application would go on the
dependencies files(package.json, Pipfile, etc ...) and search for
the requested dependencies. This made the application very slow
in addition to harming the organization of the code with many unnecessary imports.

After:
```typescript
const isDependency = await context.dependencies.includes("rubocop");
```
Now the dependency list is loaded before the introspection and
only need to read the necessary dependencies files once.

Resolves: #124
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A: Plugin - Platform Area: continuous integration platform plugins T: Enhancement Type: an enhancement to an existing feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant