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

Dev tasks: gulp update should remove ckeditor5-* symlinks which weren't defined in package.json #93

Closed
Reinmar opened this issue Feb 23, 2016 · 9 comments
Assignees
Labels
type:improvement This issue reports a possible enhancement of an existing feature.
Milestone

Comments

@Reinmar
Copy link
Member

Reinmar commented Feb 23, 2016

When you change you dev env it may happen that some deps were removed from the package.json and then it will be nice to clean up the symlinks.

@Reinmar Reinmar added module:devtasks type:improvement This issue reports a possible enhancement of an existing feature. labels Feb 23, 2016
@Reinmar
Copy link
Member Author

Reinmar commented Feb 23, 2016

It touches a more general problem – what task should I use when I'm not sure if my env is up to date. I could have switched branches, I could have added/removed deps, etc.

We've got gulp init but the name indicates that it's for starting the work. I automatically thought that gulp update will be the task I need to use, but I can see that it also doesn't relink subrepos.

I think that we need to either merge these tasks or clarify better which is to be used when. In the latter case gulp init would perhaps need to be renamed. Or, we can add a 3rd task doing both of these things. WDYT?

@Reinmar
Copy link
Member Author

Reinmar commented Feb 23, 2016

I've just realised that gulp init runs npm install which seems to make a sense if you're unsure about your env. I feel that running gulp init should be OK for these scenarios, so the only thing is the confusing name.

@Reinmar
Copy link
Member Author

Reinmar commented Mar 10, 2016

Another TC in which I'm unsure what I should do – some package was added as a dependency in CKEditor 5. What should I run in CKEditor 5 in order to clone that repo, run there npm install and link it?

@Reinmar Reinmar added ★★★ and removed labels Mar 10, 2016
@Reinmar Reinmar added this to the 0.1.0 milestone Mar 10, 2016
@Reinmar
Copy link
Member Author

Reinmar commented Mar 10, 2016

One more thing – these TCs should be added to the list here https://github.com/ckeditor/ckeditor5/wiki/Development-Workflow

@szymonkups szymonkups self-assigned this Mar 11, 2016
@szymonkups
Copy link
Contributor

It is a good idea to leave gulp init as start task and add some changes to gulp update task to match our needs. The main problem there is that after changing some configuration in main CKEditor 5 repository, there is no information about which dependencies should be in development mode and which not.

At this point gulp update takes all CKEditor 5 dependencies from package.json and checks if there are any repositories in workspace that match those dependencies and updates them. If there is no cloned repository for particular dependency - nothing happens. It's because I initially thought that there is no need to put all dependencies in development mode and update should only work on dependencies that are already in that mode.
We should change this assumption and make gulp update work on all CKEditor5 dependencies that are currently specified in package.json.

gulp update task steps after modification:

  1. Get CKEditor 5 dependencies from package.json in main CKEditor 5 repository.
  2. If dependency's repository is already cloned in workspace:
    1. Fetch and checkout to specified branch.
    2. Pull changes.
    3. if --npm-update was specified run npm update --dev in that repository.
    4. Recreate symbolic link between repo and main node_modules.
  3. If dependency's repository is not cloned yet - run gulp install on this dependency.
  4. Remove symbolic links to dependencies that are not used in current package.json configuration.
  5. if --npm-update was specified run npm update --dev in main CKeditor 5 repository.

@Reinmar
Copy link
Member Author

Reinmar commented Mar 15, 2016

Fixed by #110.

@Reinmar
Copy link
Member Author

Reinmar commented Mar 15, 2016

I'd forget that we need to upgrade https://github.com/ckeditor/ckeditor5/wiki/Development-Workflow. @szymonkups could you do that?

@szymonkups
Copy link
Contributor

Added changes to Development Workflow docs.

@Reinmar
Copy link
Member Author

Reinmar commented Mar 16, 2016

Great!

@Reinmar Reinmar closed this as completed Mar 16, 2016
mlewand pushed a commit that referenced this issue May 1, 2020
Other: Mentions can now be matched by any character typed. Closes #6398.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:improvement This issue reports a possible enhancement of an existing feature.
Projects
None yet
Development

No branches or pull requests

2 participants